Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(55)

Side by Side Diff: chrome/common/extensions/api/extension.json

Issue 1055673002: [Extensions API] Remove inline enums (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Latest master Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/common/extensions/api/debugger.json ('k') | chrome/common/extensions/api/history.json » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "description": "The <code>chrome.extension</code> API has utilities that can be used by any extension page. It includes support for exchanging messages betw een an extension and its content scripts or between extensions, as described in detail in <a href='messaging'>Message Passing</a>.", 8 "description": "The <code>chrome.extension</code> API has utilities that can be used by any extension page. It includes support for exchanging messages betw een an extension and its content scripts or between extensions, as described in detail in <a href='messaging'>Message Passing</a>.",
9 "compiler_options": { 9 "compiler_options": {
10 "implemented_in": "chrome/browser/extensions/api/module/module.h" 10 "implemented_in": "chrome/browser/extensions/api/module/module.h"
11 }, 11 },
12 "properties": { 12 "properties": {
13 "lastError": { 13 "lastError": {
14 "type": "object", 14 "type": "object",
15 "optional": true, 15 "optional": true,
16 "description": "Set for the lifetime of a callback if an ansychronous ex tension api has resulted in an error. If no error has occured lastError will be <var>undefined</var>.", 16 "description": "Set for the lifetime of a callback if an ansychronous ex tension api has resulted in an error. If no error has occured lastError will be <var>undefined</var>.",
17 "properties": { 17 "properties": {
18 "message": { "type": "string", "description": "Description of the erro r that has taken place." } 18 "message": { "type": "string", "description": "Description of the erro r that has taken place." }
19 } 19 }
20 }, 20 },
21 "inIncognitoContext": { 21 "inIncognitoContext": {
22 "type": "boolean", 22 "type": "boolean",
23 "optional": true, 23 "optional": true,
24 "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." 24 "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."
25 } 25 }
26 }, 26 },
27 "types": [
28 {
29 "id": "ViewType",
30 "type": "string",
31 "enum": ["tab", "notification", "popup"],
32 "description": "The type of extension view."
33 }
34 ],
27 "functions": [ 35 "functions": [
28 { 36 {
29 "name": "sendRequest", 37 "name": "sendRequest",
30 "nocompile": true, 38 "nocompile": true,
31 "deprecated": "Please use $(ref:runtime.sendMessage).", 39 "deprecated": "Please use $(ref:runtime.sendMessage).",
32 "type": "function", 40 "type": "function",
33 "allowAmbiguousOptionalArguments": true, 41 "allowAmbiguousOptionalArguments": true,
34 "description": "Sends a single request to other listeners within the ext ension. Similar to $(ref:runtime.connect), but only sends a single request with an optional response. The $(ref:extension.onRequest) event is fired in each page of the extension.", 42 "description": "Sends a single request to other listeners within the ext ension. Similar to $(ref:runtime.connect), but only sends a single request with an optional response. The $(ref:extension.onRequest) event is fired in each page of the extension.",
35 "parameters": [ 43 "parameters": [
36 {"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."}, 44 {"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."},
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 "nocompile": true, 79 "nocompile": true,
72 "type": "function", 80 "type": "function",
73 "description": "Returns an array of the JavaScript 'window' objects for each of the pages running inside the current extension.", 81 "description": "Returns an array of the JavaScript 'window' objects for each of the pages running inside the current extension.",
74 "parameters": [ 82 "parameters": [
75 { 83 {
76 "type": "object", 84 "type": "object",
77 "name": "fetchProperties", 85 "name": "fetchProperties",
78 "optional": true, 86 "optional": true,
79 "properties": { 87 "properties": {
80 "type": { 88 "type": {
81 "type": "string", 89 "$ref": "ViewType",
82 "enum": ["tab", "notification", "popup"],
83 "optional": true, 90 "optional": true,
84 "description": "The type of view to get. If omitted, returns all views (including background pages and tabs). Valid values: 'tab', 'notification ', 'popup'." 91 "description": "The type of view to get. If omitted, returns all views (including background pages and tabs). Valid values: 'tab', 'notification ', 'popup'."
85 }, 92 },
86 "windowId": { 93 "windowId": {
87 "type": "integer", 94 "type": "integer",
88 "optional": true, 95 "optional": true,
89 "description": "The window to restrict the search to. If omitted , returns all views." 96 "description": "The window to restrict the search to. If omitted , returns all views."
90 } 97 }
91 } 98 }
92 } 99 }
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 "description": "Fired when a request is sent from another extension.", 213 "description": "Fired when a request is sent from another extension.",
207 "parameters": [ 214 "parameters": [
208 {"name": "request", "type": "any", "optional": true, "description": "T he request sent by the calling script."}, 215 {"name": "request", "type": "any", "optional": true, "description": "T he request sent by the calling script."},
209 {"name": "sender", "$ref": "runtime.MessageSender" }, 216 {"name": "sender", "$ref": "runtime.MessageSender" },
210 {"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." } 217 {"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 ] 218 ]
212 } 219 }
213 ] 220 ]
214 } 221 }
215 ] 222 ]
OLDNEW
« no previous file with comments | « chrome/common/extensions/api/debugger.json ('k') | chrome/common/extensions/api/history.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698