| 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": "runtime", | 7 "namespace": "runtime", |
| 8 "types": [ | 8 "types": [ |
| 9 { | 9 { |
| 10 "id": "Port", | 10 "id": "Port", |
| (...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 "type": "string", | 363 "type": "string", |
| 364 "description": "The version number of the available update." | 364 "description": "The version number of the available update." |
| 365 } | 365 } |
| 366 }, | 366 }, |
| 367 "additionalProperties": { "type": "any" }, | 367 "additionalProperties": { "type": "any" }, |
| 368 "description": "The manifest details of the available update." | 368 "description": "The manifest details of the available update." |
| 369 } | 369 } |
| 370 ] | 370 ] |
| 371 }, | 371 }, |
| 372 { | 372 { |
| 373 // TODO(xiyuan): onBrowserUpdateAvailable is deprecated in favor of |
| 374 // onRestartRequired. We should remove it when we are sure it is unused. |
| 373 "name": "onBrowserUpdateAvailable", | 375 "name": "onBrowserUpdateAvailable", |
| 374 "type": "function", | 376 "type": "function", |
| 375 "description": "Fired when a Chrome update is available, but isn't insta
lled immediately because a browser restart is required.", | 377 "description": "Fired when a Chrome update is available, but isn't insta
lled immediately because a browser restart is required.", |
| 378 "nodoc": true, |
| 376 "parameters": [] | 379 "parameters": [] |
| 377 }, | 380 }, |
| 378 { | 381 { |
| 379 "name": "onConnect", | 382 "name": "onConnect", |
| 380 "type": "function", | 383 "type": "function", |
| 381 "nocompile": true, | 384 "nocompile": true, |
| 382 "anonymous": true, | 385 "anonymous": true, |
| 383 "description": "Fired when a connection is made from either an extension
process or a content script.", | 386 "description": "Fired when a connection is made from either an extension
process or a content script.", |
| 384 "parameters": [ | 387 "parameters": [ |
| 385 {"$ref": "Port", "name": "port"} | 388 {"$ref": "Port", "name": "port"} |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 419 "parameters": [ | 422 "parameters": [ |
| 420 {"name": "message", "type": "any", "description": "The message sent by
the calling script."}, | 423 {"name": "message", "type": "any", "description": "The message sent by
the calling script."}, |
| 421 {"name": "sender", "$ref": "MessageSender" }, | 424 {"name": "sender", "$ref": "MessageSender" }, |
| 422 {"name": "sendResponse", "type": "function", "description": "Function
to call (at most once) when you have a response. The argument should be any JSON
-ifiable object. If you have more than one <code>onMessage</code> listener in th
e same document, then only one may send a response. This function becomes invali
d when the event listener returns, unless you return true from the event listene
r to indicate you wish to send a response asynchronously (this will keep the mes
sage channel open to the other end until <code>sendResponse</code> is called)."
} | 425 {"name": "sendResponse", "type": "function", "description": "Function
to call (at most once) when you have a response. The argument should be any JSON
-ifiable object. If you have more than one <code>onMessage</code> listener in th
e same document, then only one may send a response. This function becomes invali
d when the event listener returns, unless you return true from the event listene
r to indicate you wish to send a response asynchronously (this will keep the mes
sage channel open to the other end until <code>sendResponse</code> is called)."
} |
| 423 ], | 426 ], |
| 424 "returns": { | 427 "returns": { |
| 425 "type": "boolean", | 428 "type": "boolean", |
| 426 "optional": "true", | 429 "optional": "true", |
| 427 "description": "Return true from the event listener if you wish to cal
l <code>sendResponse</code> after the event listener returns." | 430 "description": "Return true from the event listener if you wish to cal
l <code>sendResponse</code> after the event listener returns." |
| 428 } | 431 } |
| 432 }, |
| 433 { |
| 434 "name": "onRestartRequired", |
| 435 "type": "function", |
| 436 "description": "Fired when an app or the device that it runs on needs to
be restarted. The app should close all its windows at its earliest convenient t
ime to let the restart to happen. If the app does nothing, a restart will be enf
orced after a 24-hour grace period has passed. Currently, this event is only fir
ed for Chrome OS kiosk apps.", |
| 437 "parameters": [ |
| 438 { |
| 439 "type": "string", |
| 440 "name": "reason", |
| 441 "description": "The reason that the event is being dispatched. 'app_
update' is used when the restart is needed because the application is updated to
a newer version. 'os_update' is used when the restart is needed because the bro
wser/OS is updated to a newer version. 'periodic' is used when the system runs f
or more than the permitted uptime set in the enterprise policy.", |
| 442 "enum": ["app_update", "os_update", "periodic"] |
| 443 } |
| 444 ] |
| 429 } | 445 } |
| 430 | |
| 431 | |
| 432 | |
| 433 ] | 446 ] |
| 434 } | 447 } |
| 435 ] | 448 ] |
| OLD | NEW |