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

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

Issue 10392008: Move declarative API into events API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
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": "Tab", "optional": true, "description":"This property will <b>only</b> be present when the connection was opened from a tab or content script."}, 16 "tab": {"$ref": "Tab", "optional": true, "description":"This property will <b>only</b> be present when the connection was opened from a tab or content 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",
battre 2012/05/09 16:28:08 this went into events.json.
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": "Event" },
39 "onMessage": { "$ref": "Event" }, 27 "onMessage": { "$ref": "Event" },
40 "postMessage": {"type": "function"}, 28 "postMessage": {"type": "function"},
41 "sender": { 29 "sender": {
42 "$ref": "MessageSender", 30 "$ref": "MessageSender",
(...skipping 294 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

Powered by Google App Engine
This is Rietveld 408576698