Chromium Code Reviews| 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 "documentation_permissions_required": ["runtime"], | 8 "documentation_permissions_required": ["runtime"], |
| 9 "types": [ | 9 "types": [ |
| 10 { | 10 { |
| (...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 345 "type": "string", | 345 "type": "string", |
| 346 "description": "The version number of the available update." | 346 "description": "The version number of the available update." |
| 347 } | 347 } |
| 348 }, | 348 }, |
| 349 "additionalProperties": { "type": "any" }, | 349 "additionalProperties": { "type": "any" }, |
| 350 "description": "The manifest details of the available update." | 350 "description": "The manifest details of the available update." |
| 351 } | 351 } |
| 352 ] | 352 ] |
| 353 }, | 353 }, |
| 354 { | 354 { |
| 355 // TODO(xiyuan): onBrowserUpdateAvailable is deprecated in favor of | |
| 356 // onRestartRequired. We should remove it when we are sure it is unused. | |
| 355 "name": "onBrowserUpdateAvailable", | 357 "name": "onBrowserUpdateAvailable", |
| 356 "type": "function", | 358 "type": "function", |
| 357 "description": "Fired when a Chrome update is available, but isn't insta lled immediately because a browser restart is required.", | 359 "description": "Fired when a Chrome update is available, but isn't insta lled immediately because a browser restart is required.", |
| 360 "nodoc": true, | |
| 358 "parameters": [] | 361 "parameters": [] |
| 359 }, | 362 }, |
| 360 { | 363 { |
| 361 "name": "onConnect", | 364 "name": "onConnect", |
| 362 "type": "function", | 365 "type": "function", |
| 363 "nocompile": true, | 366 "nocompile": true, |
| 364 "anonymous": true, | 367 "anonymous": true, |
| 365 "description": "Fired when a connection is made from either an extension process or a content script.", | 368 "description": "Fired when a connection is made from either an extension process or a content script.", |
| 366 "parameters": [ | 369 "parameters": [ |
| 367 {"$ref": "Port", "name": "port"} | 370 {"$ref": "Port", "name": "port"} |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 401 "parameters": [ | 404 "parameters": [ |
| 402 {"name": "message", "type": "any", "description": "The message sent by the calling script."}, | 405 {"name": "message", "type": "any", "description": "The message sent by the calling script."}, |
| 403 {"name": "sender", "$ref": "MessageSender" }, | 406 {"name": "sender", "$ref": "MessageSender" }, |
| 404 {"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)." } | 407 {"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)." } |
| 405 ], | 408 ], |
| 406 "returns": { | 409 "returns": { |
| 407 "type": "boolean", | 410 "type": "boolean", |
| 408 "optional": "true", | 411 "optional": "true", |
| 409 "description": "Return true from the event listener if you wish to cal l <code>sendResponse</code> after the event listener returns." | 412 "description": "Return true from the event listener if you wish to cal l <code>sendResponse</code> after the event listener returns." |
| 410 } | 413 } |
| 414 }, | |
| 415 { | |
| 416 "name": "onRestartRequired", | |
| 417 "type": "function", | |
| 418 "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.", | |
| 419 "parameters": [ | |
| 420 { | |
| 421 "type": "string", | |
| 422 "name": "reason", | |
| 423 "description": "The reason that the event is being dispatched.", | |
|
Matt Perry
2013/06/21 22:43:32
I think it's worth documenting what each enum mean
xiyuan
2013/06/21 22:57:17
Done.
| |
| 424 "enum": ["app_update", "os_update", "periodic"] | |
| 425 } | |
| 426 ] | |
| 411 } | 427 } |
| 412 | |
| 413 | |
| 414 | |
| 415 ] | 428 ] |
| 416 } | 429 } |
| 417 ] | 430 ] |
| OLD | NEW |