// 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" } ] } ] } ]