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

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

Issue 10392127: Move declarative API into events API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix change schema type reference from 'Event' to 'events.Event' Created 8 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « chrome/common/extensions/api/events.json ('k') | chrome/common/extensions/api/extension_api.cc » ('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 "nocompile": true, 8 "nocompile": true,
9 "dependencies": [ "tabs" ], 9 "dependencies": [ "events", "tabs" ],
10 "types": [ 10 "types": [
11 { 11 {
12 "id": "MessageSender", 12 "id": "MessageSender",
13 "type": "object", 13 "type": "object",
14 "description": "An object containing information about the script contex t that sent a message or request.", 14 "description": "An object containing information about the script contex t that sent a message or request.",
15 "properties": { 15 "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."}, 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."},
17 "id": {"type": "string", "description": "The extension ID of the exten sion that opened the connection."} 17 "id": {"type": "string", "description": "The extension ID of the exten sion that opened the connection."}
18 } 18 }
19 }, 19 },
20 { 20 {
21 "id": "Event",
22 "type": "object",
23 "description": "An object which allows the addition and removal of liste ners for a Chrome event.",
24 "properties": {
25 "addListener": {"type": "function"},
26 "removeListener": {"type": "function"},
27 "hasListener": {"type": "function"},
28 "hasListeners": {"type": "function"}
29 },
30 "additionalProperties": { "type": "any"}
31 },
32 {
33 "id": "Port", 21 "id": "Port",
34 "type": "object", 22 "type": "object",
35 "description": "An object which allows two way communication with other pages.", 23 "description": "An object which allows two way communication with other pages.",
36 "properties": { 24 "properties": {
37 "name": {"type": "string"}, 25 "name": {"type": "string"},
38 "onDisconnect": { "$ref": "Event" }, 26 "onDisconnect": { "$ref": "events.Event" },
39 "onMessage": { "$ref": "Event" }, 27 "onMessage": { "$ref": "events.Event" },
40 "postMessage": {"type": "function"}, 28 "postMessage": {"type": "function"},
41 "sender": { 29 "sender": {
42 "$ref": "MessageSender", 30 "$ref": "MessageSender",
43 "optional": true, 31 "optional": true,
44 "description": "This property will <b>only</b> be present on ports p assed to onConnect/onConnectExternal listeners." 32 "description": "This property will <b>only</b> be present on ports p assed to onConnect/onConnectExternal listeners."
45 } 33 }
46 }, 34 },
47 "additionalProperties": { "type": "any"} 35 "additionalProperties": { "type": "any"}
48 } 36 }
49 ], 37 ],
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 ], 325 ],
338 "returns": { 326 "returns": {
339 "type": "boolean", 327 "type": "boolean",
340 "optional": "true", 328 "optional": "true",
341 "description": "Return true from the event listener if you wish to cal l <code>sendResponse</code> after the event listener returns." 329 "description": "Return true from the event listener if you wish to cal l <code>sendResponse</code> after the event listener returns."
342 } 330 }
343 } 331 }
344 ] 332 ]
345 } 333 }
346 ] 334 ]
OLDNEW
« no previous file with comments | « chrome/common/extensions/api/events.json ('k') | chrome/common/extensions/api/extension_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698