| 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 "nocompile": true, |
| 9 "dependencies": [ "events", "tabs" ], | 9 "dependencies": [ "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 { |
| 21 "id": "Port", | 33 "id": "Port", |
| 22 "type": "object", | 34 "type": "object", |
| 23 "description": "An object which allows two way communication with other
pages.", | 35 "description": "An object which allows two way communication with other
pages.", |
| 24 "properties": { | 36 "properties": { |
| 25 "name": {"type": "string"}, | 37 "name": {"type": "string"}, |
| 26 "onDisconnect": { "$ref": "Event" }, | 38 "onDisconnect": { "$ref": "Event" }, |
| 27 "onMessage": { "$ref": "Event" }, | 39 "onMessage": { "$ref": "Event" }, |
| 28 "postMessage": {"type": "function"}, | 40 "postMessage": {"type": "function"}, |
| 29 "sender": { | 41 "sender": { |
| 30 "$ref": "MessageSender", | 42 "$ref": "MessageSender", |
| (...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 ], | 337 ], |
| 326 "returns": { | 338 "returns": { |
| 327 "type": "boolean", | 339 "type": "boolean", |
| 328 "optional": "true", | 340 "optional": "true", |
| 329 "description": "Return true from the event listener if you wish to cal
l <code>sendResponse</code> after the event listener returns." | 341 "description": "Return true from the event listener if you wish to cal
l <code>sendResponse</code> after the event listener returns." |
| 330 } | 342 } |
| 331 } | 343 } |
| 332 ] | 344 ] |
| 333 } | 345 } |
| 334 ] | 346 ] |
| OLD | NEW |