summaryrefslogtreecommitdiffstats
path: root/chrome/common/extensions/api/activity_log_private.json
blob: 72dbc46c5bd3c67df4f6718c895d50175b413180 (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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

[
  {
    "namespace": "activityLogPrivate",
    "description": "none",
    "types": [
      {
        "id": "DomActivityDetail",
        "type": "object",
        "description": "Stores the fields associated with an ActivityLog DomAction.",
        "properties": {
          "domActivityType": {"type": "string", "enum": ["getter", "setter", "method", "inserted", "xhr", "webrequest", "modified"], "optional": true},
          "url": {"type": "string", "optional": true},
          "urlTitle": {"type": "string", "optional": true},
          "apiCall": {"type": "string", "optional": true},
          "args": {"type": "string", "optional": true},
          "extra": {"type": "string", "optional": true}
        }
      },
      {
        "id": "ChromeActivityDetail",
        "type": "object",
        "description": "Stores the fields associated with an ActivityLog ApiAction.",
        "properties": {
          "apiActivityType": {"type": "string", "enum": ["call", "event_callback", "unknown_type"], "optional": true},
          "apiCall": {"type": "string", "optional": true},
          "args": {"type": "string", "optional": true},
          "extra": {"type": "string", "optional": true}
        }
      },
      {
        "id": "BlockedChromeActivityDetail",
        "type": "object",
        "description": "Stores the fields associated with an ActivityLog BlockedAction.",
        "properties": {
          "apiCall": {"type": "string", "optional": true},
          "args": {"type": "string", "optional": true},
          "reason": {"type": "string", "enum": ["unknown_reason_type", "access_denied", "quota_exceeded"], "optional": true},
          "extra": {"type": "string", "optional": true}
        }
      },
      {
        "id": "ActivityFilter",
        "type": "object",
        "description": "The result set will be limited to rows that match the specification. All matches will be exact except for the URL field of domActivityDetail, which is considered a prefix.",
        "properties": {
          "extensionId": {"type": "string", "optional": true},
          "daysAgo": {"type": "string", "optional": true},
          "activityType": {"type": "string", "enum": ["dom", "chrome", "blocked_chrome"], "optional": true},
          "domActivityDetail": {"$ref": "DomActivityDetail", "optional": true},
          "chromeActivityDetail": {"$ref": "ChromeActivityDetail", "optional": true},
          "blockedChromeActivityDetail": {"$ref": "BlockedChromeActivityDetail", "optional": true}
        }
      },
      {
        "id": "ExtensionActivity",
        "type": "object",
        "description": "This corresponds to a row from the ActivityLog database. Fields will be blank if they were specified precisely in a lookup filter.",
        "properties": {
          "extensionId": {"type": "string", "optional": true},
          "time": {"type": "number", "optional": true},
          "count": {"type": "integer", "optional": true},
          "activityType": {"type": "string", "enum": ["dom", "chrome", "blocked_chrome"], "optional": true},
          "domActivityDetail": {"$ref": "DomActivityDetail", "optional": true},
          "chromeActivityDetail": {"$ref": "ChromeActivityDetail", "optional": true},
          "blockedChromeActivityDetail": {"$ref": "BlockedChromeActivityDetail", "optional": true}
        }
      },
      {
        "id": "ActivityResultSet",
        "type": "object",
        "description": "This holds the results of a lookup, the filter of the lookup, and the page of the lookup if there is more than one page of results.",
        "properties": {
          "result": {"type": "array", "items": {"$ref": "ExtensionActivity"}},
          "filter": {"$ref": "ActivityFilter"},
          "page": {"type": "integer", "optional": true}
        }
      }
    ],
    "functions": [
      {
        "name": "getExtensionActivities",
        "type": "function",
        "description": "Retrieves activity from the ActivityLog that matches the specified filter.",
        "parameters": [
          {
            "name": "filter",
            "$ref": "ActivityFilter"
          },
          {
            "name": "page",
            "type": "integer",
            "optional": true,
            "description": "Specify this if you want a specific page of results."
          },
          {
            "name": "callback",
            "type": "function",
            "parameters": [
              {
                "name": "result",
                "$ref": "ActivityResultSet"
              }
            ]
          }
        ]
      }
    ],
    "events": [
      {
        "name": "onExtensionActivity",
        "type": "function",
        "description": "Fired when a given extension performs another activity.",
        "parameters": [
          {
            "name": "activity",
            "$ref": "ExtensionActivity"
          }
        ]
      }
    ]
  }
]