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

Unified Diff: chrome/common/extensions/api/extension_api.json

Issue 8177022: Add onChanged events to the extension settings API, both from sync and between (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 9 years, 2 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
« no previous file with comments | « chrome/chrome_browser.gypi ('k') | chrome/common/extensions/docs/experimental.settings.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/api/extension_api.json
diff --git a/chrome/common/extensions/api/extension_api.json b/chrome/common/extensions/api/extension_api.json
index f01bc14099cb782a4ad5503cbe418058c0d0c5a4..69163cbacfd12a8ab84a8619e532ad48413326b5 100644
--- a/chrome/common/extensions/api/extension_api.json
+++ b/chrome/common/extensions/api/extension_api.json
@@ -1005,7 +1005,25 @@
},
{
"namespace": "experimental.settings",
- "types": [],
+ "types": [
+ {
+ "id": "SettingChange",
+ "type": "object",
+ "properties": {
+ "key": {"type": "string", "description": "The ID of the setting which changed."},
+ "oldValue": {
+ "type": "any",
+ "description": "The old value of the setting, before it changed.",
+ "optional": true
+ },
+ "newValue": {
+ "type": "any",
+ "description": "The new value of the setting.",
+ "optional": true
+ }
+ }
+ }
+ ],
"functions": [
{
"name": "get",
@@ -1103,7 +1121,20 @@
]
}
],
- "events": []
+ "events": [
+ {
+ "name": "onChanged",
+ "type": "function",
+ "description": "Fired when one or more settings change.",
+ "parameters": [
+ {
+ "name": "changes",
+ "type": "array",
+ "items": {"$ref": "SettingChange"}
+ }
+ ]
+ }
+ ]
},
{
"namespace": "windows",
« no previous file with comments | « chrome/chrome_browser.gypi ('k') | chrome/common/extensions/docs/experimental.settings.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698