1 // Copyright 2013 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 [ 6 { 7 "namespace": "activityLogPrivate", 8 "description": "none", 9 "types": [ 10 { 11 "id": "DomActivityDetail", 12 "type": "object", 13 "description": "Stores the fields associated with an ActivityLog DomAction.", 14 "properties": { 15 "domActivityType": {"type": "string", "enum": ["getter", "setter", "method", "inserted", "xhr", "webrequest", "modified"], "optional": true}, 16 "url": {"type": "string", "optional": true}, 17 "urlTitle": {"type": "string", "optional": true}, 18 "apiCall": {"type": "string", "optional": true}, 19 "args": {"type": "string", "optional": true}, 20 "extra": {"type": "string", "optional": true} 21 } 22 }, 23 { 24 "id": "ChromeActivityDetail", 25 "type": "object", 26 "description": "Stores the fields associated with an ActivityLog ApiAction.", 27 "properties": { 28 "apiActivityType": {"type": "string", "enum": ["call", "event_callback", "unknown_type"], "optional": true}, 29 "apiCall": {"type": "string", "optional": true}, 30 "args": {"type": "string", "optional": true}, 31 "extra": {"type": "string", "optional": true} 32 } 33 }, 34 { 35 "id": "BlockedChromeActivityDetail", 36 "type": "object", 37 "description": "Stores the fields associated with an ActivityLog BlockedAction.", 38 "properties": { 39 "apiCall": {"type": "string", "optional": true}, 40 "args": {"type": "string", "optional": true}, 41 "reason": {"type": "string", "enum": ["unknown_reason_type", "access_denied", "quota_exceeded"], "optional": true}, 42 "extra": {"type": "string", "optional": true} 43 } 44 }, 45 { 46 "id": "ActivityFilter", 47 "type": "object", 48 "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.", 49 "properties": { 50 "extensionId": {"type": "string", "optional": true}, 51 "daysAgo": {"type": "string", "optional": true}, 52 "activityType": {"type": "string", "enum": ["dom", "chrome", "blocked_chrome"], "optional": true}, 53 "domActivityDetail": {"$ref": "DomActivityDetail", "optional": true}, 54 "chromeActivityDetail": {"$ref": "ChromeActivityDetail", "optional": true}, 55 "blockedChromeActivityDetail": {"$ref": "BlockedChromeActivityDetail", "optional": true} 56 } 57 }, 58 { 59 "id": "ExtensionActivity", 60 "type": "object", 61 "description": "This corresponds to a row from the ActivityLog database. Fields will be blank if they were specified precisely in a lookup filter.", 62 "properties": { 63 "extensionId": {"type": "string", "optional": true}, 64 "time": {"type": "number", "optional": true}, 65 "count": {"type": "integer", "optional": true}, 66 "activityType": {"type": "string", "enum": ["dom", "chrome", "blocked_chrome"], "optional": true}, 67 "domActivityDetail": {"$ref": "DomActivityDetail", "optional": true}, 68 "chromeActivityDetail": {"$ref": "ChromeActivityDetail", "optional": true}, 69 "blockedChromeActivityDetail": {"$ref": "BlockedChromeActivityDetail", "optional": true} 70 } 71 }, 72 { 73 "id": "ActivityResultSet", 74 "type": "object", 75 "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.", 76 "properties": { 77 "result": {"type": "array", "items": {"$ref": "ExtensionActivity"}}, 78 "filter": {"$ref": "ActivityFilter"}, 79 "page": {"type": "integer", "optional": true} 80 } 81 } 82 ], 83 "functions": [ 84 { 85 "name": "getExtensionActivities", 86 "type": "function", 87 "description": "Retrieves activity from the ActivityLog that matches the specified filter.", 88 "parameters": [ 89 { 90 "name": "filter", 91 "$ref": "ActivityFilter" 92 }, 93 { 94 "name": "page", 95 "type": "integer", 96 "optional": true, 97 "description": "Specify this if you want a specific page of results." 98 }, 99 { 100 "name": "callback", 101 "type": "function", 102 "parameters": [ 103 { 104 "name": "result", 105 "$ref": "ActivityResultSet" 106 } 107 ] 108 } 109 ] 110 } 111 ], 112 "events": [ 113 { 114 "name": "onExtensionActivity", 115 "type": "function", 116 "description": "Fired when a given extension performs another activity.", 117 "parameters": [ 118 { 119 "name": "activity", 120 "$ref": "ExtensionActivity" 121 } 122 ] 123 } 124 ] 125 } 126 ] 127