summaryrefslogtreecommitdiffstats
path: root/toolkit/components/extensions/schemas/activity_log.json
blob: 7f60817539f9a3c8ba7b59e84d97d4ea6359fdfa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
[
  {
    "namespace": "manifest",
    "types": [
      {
        "$extend": "PermissionPrivileged",
        "choices": [
          {
            "type": "string",
            "enum": ["activityLog"]
          }
        ]
      }
    ]
  },
  {
    "namespace": "activityLog",
    "description": "Monitor extension activity",
    "permissions": ["activityLog"],
    "events": [
      {
        "name": "onExtensionActivity",
        "description": "Receives an activityItem for each logging event.",
        "type": "function",
        "parameters": [
          {
            "name": "details",
            "type": "object",
            "properties": {
              "timeStamp": {
                "$ref": "extensionTypes.Date",
                "description": "The date string when this call is triggered."
              },
              "type": {
                "type": "string",
                "enum": [
                  "api_call",
                  "api_event",
                  "content_script",
                  "user_script"
                ],
                "description": "The type of log entry.  api_call is a function call made by the extension and api_event is an event callback to the extension.  content_script is logged when a content script is injected."
              },
              "viewType": {
                "type": "string",
                "optional": true,
                "enum": [
                  "background",
                  "popup",
                  "sidebar",
                  "tab",
                  "devtools_page",
                  "devtools_panel"
                ],
                "description": "The type of view where the activity occurred.  Content scripts will not have a viewType."
              },
              "name": {
                "type": "string",
                "description": "The name of the api call or event, or the script url if this is a content or user script event."
              },
              "data": {
                "type": "object",
                "properties": {
                  "args": {
                    "type": "array",
                    "optional": true,
                    "items": {
                      "type": "any"
                    },
                    "description": "A list of arguments passed to the call."
                  },
                  "result": {
                    "type": "object",
                    "optional": true,
                    "description": "The result of the call."
                  },
                  "tabId": {
                    "type": "integer",
                    "optional": true,
                    "description": "The tab associated with this event if it is a tab or content script."
                  },
                  "url": {
                    "type": "string",
                    "optional": true,
                    "description": "If the type is content_script, this is the url of the script that was injected."
                  }
                }
              }
            }
          }
        ],
        "extraParameters": [
          {
            "name": "id",
            "type": "string"
          }
        ]
      }
    ]
  }
]