| 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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 } | 257 } |
| 258 ] | 258 ] |
| 259 }, | 259 }, |
| 260 { | 260 { |
| 261 "name": "restart", | 261 "name": "restart", |
| 262 "description": "Restart the ChromeOS device when the app runs in kiosk m
ode. Otherwise, it's no-op.", | 262 "description": "Restart the ChromeOS device when the app runs in kiosk m
ode. Otherwise, it's no-op.", |
| 263 "type": "function", | 263 "type": "function", |
| 264 "parameters": [] | 264 "parameters": [] |
| 265 }, | 265 }, |
| 266 { | 266 { |
| 267 "name": "restartAfterDelay", |
| 268 "description": "Restart the ChromeOS device when the app runs in kiosk m
ode after the given seconds. If called again before the time ends, the reboot wi
ll be delayed. If called with a value of -1, the reboot will be cancelled. It's
a no-op in non-kiosk mode. It's only allowed to be called repeatedly by the firs
t extension to invoke this API.", |
| 269 "type": "function", |
| 270 "parameters": [ |
| 271 { |
| 272 "type": "integer", |
| 273 "name": "seconds", |
| 274 "description": "Time to wait in seconds before rebooting the device,
or -1 to cancel a scheduled reboot." |
| 275 }, |
| 276 { |
| 277 "type": "function", |
| 278 "name": "callback", |
| 279 "description": "A callback to be invoked when a restart request was
successfully rescheduled.", |
| 280 "optional": true |
| 281 } |
| 282 ] |
| 283 }, |
| 284 { |
| 267 "name": "connect", | 285 "name": "connect", |
| 268 "type": "function", | 286 "type": "function", |
| 269 "nocompile": true, | 287 "nocompile": true, |
| 270 "description": "Attempts to connect to connect listeners within an exten
sion/app (such as the background page), or other extensions/apps. This is useful
for content scripts connecting to their extension processes, inter-app/extensio
n communication, and <a href=\"manifest/externally_connectable.html\">web messag
ing</a>. Note that this does not connect to any listeners in a content script. E
xtensions may connect to content scripts embedded in tabs via $(ref:tabs.connect
).", | 288 "description": "Attempts to connect to connect listeners within an exten
sion/app (such as the background page), or other extensions/apps. This is useful
for content scripts connecting to their extension processes, inter-app/extensio
n communication, and <a href=\"manifest/externally_connectable.html\">web messag
ing</a>. Note that this does not connect to any listeners in a content script. E
xtensions may connect to content scripts embedded in tabs via $(ref:tabs.connect
).", |
| 271 "parameters": [ | 289 "parameters": [ |
| 272 {"type": "string", "name": "extensionId", "optional": true, "descripti
on": "The ID of the extension or app to connect to. If omitted, a connection wil
l be attempted with your own extension. Required if sending messages from a web
page for <a href=\"manifest/externally_connectable.html\">web messaging</a>."}, | 290 {"type": "string", "name": "extensionId", "optional": true, "descripti
on": "The ID of the extension or app to connect to. If omitted, a connection wil
l be attempted with your own extension. Required if sending messages from a web
page for <a href=\"manifest/externally_connectable.html\">web messaging</a>."}, |
| 273 { | 291 { |
| 274 "type": "object", | 292 "type": "object", |
| 275 "name": "connectInfo", | 293 "name": "connectInfo", |
| 276 "properties": { | 294 "properties": { |
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 543 { | 561 { |
| 544 "$ref": "OnRestartRequiredReason", | 562 "$ref": "OnRestartRequiredReason", |
| 545 "name": "reason", | 563 "name": "reason", |
| 546 "description": "The reason that the event is being dispatched." | 564 "description": "The reason that the event is being dispatched." |
| 547 } | 565 } |
| 548 ] | 566 ] |
| 549 } | 567 } |
| 550 ] | 568 ] |
| 551 } | 569 } |
| 552 ] | 570 ] |
| OLD | NEW |