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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: extensions/common/api/runtime.json
diff --git a/extensions/common/api/runtime.json b/extensions/common/api/runtime.json
index c36c6c74879cf842697679a63fe10fed255c36a1..f466fe4d15fbff5905bf9e6bc03ca4de5531c6c6 100644
--- a/extensions/common/api/runtime.json
+++ b/extensions/common/api/runtime.json
@@ -264,6 +264,36 @@
"parameters": []
},
{
+ "name": "restartOnWatchdog",
+ "description": "Restart the ChromeOS device when the app runs in kiosk mode after the given seconds. If called again before the time ends, the reboot will 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 first extension to invoke this API.",
+ "type": "function",
+ "parameters": [
+ {
+ "type": "integer",
+ "name": "seconds",
+ "description": "Time to wait in seconds before rebooting the device, or -1 to cancel a scheduled reboot."
+ },
+ {
+ "type": "function",
+ "name": "onWatchdogTimeoutCallback",
+ "description": "A callback to be invoked when a scheduled restart attempt is executed or when an immediate status is sent to the caller, like failure or success to cancel any previously scheduled restarts.",
+ "optional": true,
+ "parameters": [
+ {
+ "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.
+ "type": "boolean",
+ "description": "Status of the request. True when the restart attempt is successful or when a previously scheduled restart was cancled by calling this API with seconds = -1. False otherwise."
+ },
+ {
+ "name": "message",
+ "type": "string",
+ "description": "Status message of the request."
+ }
+ ]
+ }
+ ]
+ },
+ {
"name": "connect",
"type": "function",
"nocompile": true,

Powered by Google App Engine
This is Rietveld 408576698