Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(90)

Side by Side Diff: extensions/common/api/runtime.json

Issue 1970613003: Add a new app API to enable watchdog behavior restarts in kiosk apps (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase + Nits Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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": "restartOnWatchdog",
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": "onWatchdogTimeoutCallback",
279 "description": "A callback to be invoked when a scheduled restart at tempt is executed or when an immediate status is sent to the caller, like failur e or success to cancel any previously scheduled restarts.",
280 "optional": true,
281 "parameters": [
282 {
283 "name": "success",
Devlin 2016/05/20 17:26:33 For consistency, success should be indicated by wh
afakhry 2016/05/21 01:13:00 I'm sorry, I don't get this comment. Not sure whic
Devlin 2016/05/23 16:49:39 chrome.runtime.lastError is used to indicate wheth
afakhry 2016/05/25 01:55:46 Done.
284 "type": "boolean",
285 "description": "Status of the request. True when the restart att empt is successful or when a previously scheduled restart was cancled by calling this API with seconds = -1. False otherwise."
286 },
287 {
288 "name": "message",
289 "type": "string",
290 "description": "Status message of the request."
291 }
292 ]
293 }
294 ]
295 },
296 {
267 "name": "connect", 297 "name": "connect",
268 "type": "function", 298 "type": "function",
269 "nocompile": true, 299 "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 ).", 300 "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": [ 301 "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>."}, 302 {"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 { 303 {
274 "type": "object", 304 "type": "object",
275 "name": "connectInfo", 305 "name": "connectInfo",
276 "properties": { 306 "properties": {
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
543 { 573 {
544 "$ref": "OnRestartRequiredReason", 574 "$ref": "OnRestartRequiredReason",
545 "name": "reason", 575 "name": "reason",
546 "description": "The reason that the event is being dispatched." 576 "description": "The reason that the event is being dispatched."
547 } 577 }
548 ] 578 ]
549 } 579 }
550 ] 580 ]
551 } 581 }
552 ] 582 ]
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698