OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 [ | 5 [ |
6 { | 6 { |
7 "namespace": "extension", | 7 "namespace": "extension", |
8 "nocompile": true, | 8 "compiler_options": { |
| 9 "implemented_in": "chrome/browser/extensions/api/module/module.h" |
| 10 }, |
9 "dependencies": [ "events", "tabs" ], | 11 "dependencies": [ "events", "tabs" ], |
10 "types": [ | 12 "types": [ |
11 { | 13 { |
12 "id": "MessageSender", | 14 "id": "MessageSender", |
13 "type": "object", | 15 "type": "object", |
14 "description": "An object containing information about the script contex
t that sent a message or request.", | 16 "description": "An object containing information about the script contex
t that sent a message or request.", |
15 "properties": { | 17 "properties": { |
16 "tab": {"$ref": "tabs.Tab", "optional": true, "description":"This prop
erty will <b>only</b> be present when the connection was opened from a tab or co
ntent script."}, | 18 "tab": {"$ref": "tabs.Tab", "optional": true, "description":"This prop
erty will <b>only</b> be present when the connection was opened from a tab or co
ntent script."}, |
17 "id": {"type": "string", "description": "The extension ID of the exten
sion that opened the connection."} | 19 "id": {"type": "string", "description": "The extension ID of the exten
sion that opened the connection."} |
18 } | 20 } |
(...skipping 12 matching lines...) Expand all Loading... |
31 "inIncognitoContext": { | 33 "inIncognitoContext": { |
32 "type": "boolean", | 34 "type": "boolean", |
33 "optional": true, | 35 "optional": true, |
34 "unprivileged": true, | 36 "unprivileged": true, |
35 "description": "True for content scripts running inside incognito tabs,
and for extension pages running inside an incognito process. The latter only app
lies to extensions with 'split' incognito_behavior." | 37 "description": "True for content scripts running inside incognito tabs,
and for extension pages running inside an incognito process. The latter only app
lies to extensions with 'split' incognito_behavior." |
36 } | 38 } |
37 }, | 39 }, |
38 "functions": [ | 40 "functions": [ |
39 { | 41 { |
40 "name": "sendRequest", | 42 "name": "sendRequest", |
| 43 "nocompile": true, |
41 "nodoc": true, | 44 "nodoc": true, |
42 "type": "function", | 45 "type": "function", |
43 "allowAmbiguousOptionalArguments": true, | 46 "allowAmbiguousOptionalArguments": true, |
44 "unprivileged": true, | 47 "unprivileged": true, |
45 "description": "Deprecated: Please use sendMessage.", | 48 "description": "Deprecated: Please use sendMessage.", |
46 "parameters": [ | 49 "parameters": [ |
47 {"type": "string", "name": "extensionId", "optional": true, "descripti
on": "The extension ID of the extension you want to connect to. If omitted, defa
ult is your own extension."}, | 50 {"type": "string", "name": "extensionId", "optional": true, "descripti
on": "The extension ID of the extension you want to connect to. If omitted, defa
ult is your own extension."}, |
48 { "type": "any", "name": "request" }, | 51 { "type": "any", "name": "request" }, |
49 { | 52 { |
50 "type": "function", | 53 "type": "function", |
51 "name": "responseCallback", | 54 "name": "responseCallback", |
52 "optional": true, | 55 "optional": true, |
53 "parameters": [ | 56 "parameters": [ |
54 { | 57 { |
55 "name": "response", | 58 "name": "response", |
56 "type": "any", | 59 "type": "any", |
57 "description": "The JSON response object sent by the handler of
the request. If an error occurs while connecting to the extension, the callback
will be called with no arguments and $ref:runtime.lastError will be set to the e
rror message." | 60 "description": "The JSON response object sent by the handler of
the request. If an error occurs while connecting to the extension, the callback
will be called with no arguments and $ref:runtime.lastError will be set to the e
rror message." |
58 } | 61 } |
59 ] | 62 ] |
60 } | 63 } |
61 ] | 64 ] |
62 }, | 65 }, |
63 { | 66 { |
64 "name": "getURL", | 67 "name": "getURL", |
| 68 "nocompile": true, |
65 "type": "function", | 69 "type": "function", |
66 "unprivileged": true, | 70 "unprivileged": true, |
67 "description": "Converts a relative path within an extension install dir
ectory to a fully-qualified URL.", | 71 "description": "Converts a relative path within an extension install dir
ectory to a fully-qualified URL.", |
68 "parameters": [ | 72 "parameters": [ |
69 { | 73 { |
70 "type": "string", | 74 "type": "string", |
71 "name": "path", | 75 "name": "path", |
72 "description": "A path to a resource within an extension expressed r
elative to its install directory." | 76 "description": "A path to a resource within an extension expressed r
elative to its install directory." |
73 } | 77 } |
74 ], | 78 ], |
75 "returns": { | 79 "returns": { |
76 "type": "string", | 80 "type": "string", |
77 "description": "The fully-qualified URL to the resource." | 81 "description": "The fully-qualified URL to the resource." |
78 } | 82 } |
79 }, | 83 }, |
80 { | 84 { |
81 "name": "getViews", | 85 "name": "getViews", |
| 86 "nocompile": true, |
82 "type": "function", | 87 "type": "function", |
83 "description": "Returns an array of the JavaScript 'window' objects for
each of the pages running inside the current extension.", | 88 "description": "Returns an array of the JavaScript 'window' objects for
each of the pages running inside the current extension.", |
84 "parameters": [ | 89 "parameters": [ |
85 { | 90 { |
86 "type": "object", | 91 "type": "object", |
87 "name": "fetchProperties", | 92 "name": "fetchProperties", |
88 "optional": true, | 93 "optional": true, |
89 "properties": { | 94 "properties": { |
90 "type": { | 95 "type": { |
91 "type": "string", | 96 "type": "string", |
(...skipping 10 matching lines...) Expand all Loading... |
102 } | 107 } |
103 ], | 108 ], |
104 "returns": { | 109 "returns": { |
105 "type": "array", | 110 "type": "array", |
106 "description": "Array of global objects", | 111 "description": "Array of global objects", |
107 "items": { "type": "object", "isInstanceOf": "global", "additionalProp
erties": { "type": "any" } } | 112 "items": { "type": "object", "isInstanceOf": "global", "additionalProp
erties": { "type": "any" } } |
108 } | 113 } |
109 }, | 114 }, |
110 { | 115 { |
111 "name": "getBackgroundPage", | 116 "name": "getBackgroundPage", |
| 117 "nocompile": true, |
112 "type": "function", | 118 "type": "function", |
113 "description": "Returns the JavaScript 'window' object for the backgroun
d page running inside the current extension. Returns null if the extension has n
o background page.", | 119 "description": "Returns the JavaScript 'window' object for the backgroun
d page running inside the current extension. Returns null if the extension has n
o background page.", |
114 "parameters": [], | 120 "parameters": [], |
115 "returns": { | 121 "returns": { |
116 "type": "object", "isInstanceOf": "global", "additionalProperties": {
"type": "any" } | 122 "type": "object", "isInstanceOf": "global", "additionalProperties": {
"type": "any" } |
117 } | 123 } |
118 }, | 124 }, |
119 { | 125 { |
120 "name": "getExtensionTabs", | 126 "name": "getExtensionTabs", |
| 127 "nocompile": true, |
121 "nodoc": true, | 128 "nodoc": true, |
122 "type": "function", | 129 "type": "function", |
123 "maximumManifestVersion": 1, | 130 "maximumManifestVersion": 1, |
124 "description": "Deprecated. Please use getViews({type: 'TAB'}). Returns
an array of the JavaScript 'window' objects for each of the tabs running inside
the current extension. If windowId is specified, returns only the 'window' objec
ts of tabs attached to the specified window.", | 131 "description": "Deprecated. Please use getViews({type: 'TAB'}). Returns
an array of the JavaScript 'window' objects for each of the tabs running inside
the current extension. If windowId is specified, returns only the 'window' objec
ts of tabs attached to the specified window.", |
125 "parameters": [ | 132 "parameters": [ |
126 {"type": "integer", "name": "windowId", "optional": true} | 133 {"type": "integer", "name": "windowId", "optional": true} |
127 ], | 134 ], |
128 "returns": { | 135 "returns": { |
129 "type": "array", | 136 "type": "array", |
130 "description": "Array of global window objects", | 137 "description": "Array of global window objects", |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 "description": "Deprecated: please use onMessageExternal.", | 207 "description": "Deprecated: please use onMessageExternal.", |
201 "parameters": [ | 208 "parameters": [ |
202 {"name": "request", "type": "any", "description": "The request sent by
the calling script."}, | 209 {"name": "request", "type": "any", "description": "The request sent by
the calling script."}, |
203 {"name": "sender", "$ref": "MessageSender" }, | 210 {"name": "sender", "$ref": "MessageSender" }, |
204 {"name": "sendResponse", "type": "function", "description": "Function
to call when you have a response. The argument should be any JSON-ifiable object
, or undefined if there is no response." } | 211 {"name": "sendResponse", "type": "function", "description": "Function
to call when you have a response. The argument should be any JSON-ifiable object
, or undefined if there is no response." } |
205 ] | 212 ] |
206 } | 213 } |
207 ] | 214 ] |
208 } | 215 } |
209 ] | 216 ] |
OLD | NEW |