| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 // Note: Many of these functions and events are implemented by hand and should | 5 // Note: Many of these functions and events are implemented by hand and should |
| 6 // not elicit any code generation from the schema compiler. These items are | 6 // not elicit any code generation from the schema compiler. These items are |
| 7 // marked "nocompile." | 7 // marked "nocompile." |
| 8 [ | 8 [ |
| 9 { | 9 { |
| 10 "namespace": "runtime", | 10 "namespace": "runtime", |
| (...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 319 "returns": { | 319 "returns": { |
| 320 "$ref": "Port", | 320 "$ref": "Port", |
| 321 "description": "Port through which messages can be sent and received w
ith the application" | 321 "description": "Port through which messages can be sent and received w
ith the application" |
| 322 } | 322 } |
| 323 }, | 323 }, |
| 324 { | 324 { |
| 325 "name": "sendMessage", | 325 "name": "sendMessage", |
| 326 "type": "function", | 326 "type": "function", |
| 327 "nocompile": true, | 327 "nocompile": true, |
| 328 "allowAmbiguousOptionalArguments": true, | 328 "allowAmbiguousOptionalArguments": true, |
| 329 "description": "Sends a single message to event listeners within your ex
tension/app or a different extension/app. Similar to $(ref:runtime.connect) but
only sends a single message, with an optional response. If sending to your exten
sion, the $(ref:runtime.onMessage) event will be fired in each page, or $(ref:ru
ntime.onMessageExternal), if a different extension. Note that extensions cannot
send messages to content scripts using this method. To send messages to content
scripts, use $(ref:tabs.sendMessage).", | 329 "description": "Sends a single message to event listeners within your ex
tension/app or a different extension/app. Similar to $(ref:runtime.connect) but
only sends a single message, with an optional response. If sending to your exten
sion, the $(ref:runtime.onMessage) event will be fired in every frame of your ex
tension (except for the sender's frame), or $(ref:runtime.onMessageExternal), if
a different extension. Note that extensions cannot send messages to content scr
ipts using this method. To send messages to content scripts, use $(ref:tabs.send
Message).", |
| 330 "parameters": [ | 330 "parameters": [ |
| 331 {"type": "string", "name": "extensionId", "optional": true, "descripti
on": "The ID of the extension/app to send the message to. If omitted, the messag
e will be sent to your own extension/app. Required if sending messages from a we
b page for <a href=\"manifest/externally_connectable.html\">web messaging</a>."}
, | 331 {"type": "string", "name": "extensionId", "optional": true, "descripti
on": "The ID of the extension/app to send the message to. If omitted, the messag
e will be sent to your own extension/app. Required if sending messages from a we
b page for <a href=\"manifest/externally_connectable.html\">web messaging</a>."}
, |
| 332 { "type": "any", "name": "message", "description": "The message to sen
d. This message should be a JSON-ifiable object." }, | 332 { "type": "any", "name": "message", "description": "The message to sen
d. This message should be a JSON-ifiable object." }, |
| 333 { | 333 { |
| 334 "type": "object", | 334 "type": "object", |
| 335 "name": "options", | 335 "name": "options", |
| 336 "properties": { | 336 "properties": { |
| 337 "includeTlsChannelId": { "type": "boolean", "optional": true, "des
cription": "Whether the TLS channel ID will be passed into onMessageExternal for
processes that are listening for the connection event." } | 337 "includeTlsChannelId": { "type": "boolean", "optional": true, "des
cription": "Whether the TLS channel ID will be passed into onMessageExternal for
processes that are listening for the connection event." } |
| 338 }, | 338 }, |
| 339 "optional": true | 339 "optional": true |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 561 { | 561 { |
| 562 "$ref": "OnRestartRequiredReason", | 562 "$ref": "OnRestartRequiredReason", |
| 563 "name": "reason", | 563 "name": "reason", |
| 564 "description": "The reason that the event is being dispatched." | 564 "description": "The reason that the event is being dispatched." |
| 565 } | 565 } |
| 566 ] | 566 ] |
| 567 } | 567 } |
| 568 ] | 568 ] |
| 569 } | 569 } |
| 570 ] | 570 ] |
| OLD | NEW |