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

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

Issue 7189029: Implement an initial extension settings API. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: dgrogan comments #2, mihai comments #1 Created 9 years, 6 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: 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 1613b9053703ece72a046054c8a6f05fad42fed3..fa500ffdd172656e2e0b6aeefe6ccdae3b89e1f3 100644
--- a/chrome/common/extensions/api/extension_api.json
+++ b/chrome/common/extensions/api/extension_api.json
@@ -699,6 +699,118 @@
]
},
{
+ "namespace": "experimental.settings",
+ "types": [],
+ "functions": [
+ {
+ "name": "get",
+ "type": "function",
+ "description": "Gets one or more values from settings.",
+ "parameters": [
+ {
+ "name": "keys",
+ "type": "any",
Matt Perry 2011/06/23 18:11:45 you should use the "choices" key rather than an "a
not at google - send to devlin 2011/06/27 08:51:02 Done. Though only for remove, not set?
Matt Perry 2011/06/29 18:08:11 Oops, you're right.
+ "description": "A single key or a list of keys to get from settings. Leave empty to get the entire contents of settings; this should only be used for debugging.",
+ "optional": true
+ },
+ {
+ "name": "callback",
+ "type": "function",
+ "description": "Callback with settings values, or on failure (in which case lastError will be set).",
+ "parameters": [
+ {
+ "name": "settings",
+ "type": "object",
+ "properties": {},
+ "additionalProperties": { "type": "any" },
+ "description": "Object with given keys set to settings values."
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "name": "set",
+ "type": "function",
+ "description": "Sets multiple settings values.",
+ "parameters": [
+ {
+ "name": "settings",
+ "type": "object",
+ "properties": {},
+ "additionalProperties": { "type": "any" },
+ "description": "Object to augment settings with. Values that cannot be serialized (functions, etc) will be ignored."
+ },
+ {
+ "name": "callback",
+ "type": "function",
+ "description": "Callback with settings values, or on failure (in which case lastError will be set).",
+ "parameters": [
+ {
+ "name": "settings",
+ "type": "object",
+ "properties": {},
+ "additionalProperties": { "type": "any" },
+ "description": "Object with given keys set to settings values."
+ }
+ ],
+ "optional": true
+ }
+ ]
+ },
+ {
+ "name": "remove",
+ "type": "function",
+ "description": "Removes one or more values from settings.",
+ "parameters": [
+ {
+ "name": "keys",
+ "type": "any",
+ "description": "A single key or a list of keys to remove from settings."
+ },
+ {
+ "name": "callback",
+ "type": "function",
+ "description": "Callback with an empty settings object, or on failure (in which case lastError will be set).",
+ "parameters": [
+ {
+ "name": "settings",
+ "type": "object",
+ "properties": {},
+ "additionalProperties": { "type": "any" },
+ "description": "An empty object."
+ }
+ ],
+ "optional": true
+ }
+ ]
+ },
+ {
+ "name": "clear",
+ "type": "function",
+ "description": "Removes all values from settings.",
+ "parameters": [
+ {
+ "name": "callback",
+ "type": "function",
+ "description": "Callback with an empty settings object, or on failure (in which case lastError will be set).",
+ "parameters": [
+ {
+ "name": "settings",
+ "type": "object",
+ "properties": {},
+ "additionalProperties": { "type": "any" },
+ "description": "An empty object."
+ }
+ ],
+ "optional": true
+ }
+ ]
+ }
+ ],
+ "events": []
+ },
+ {
"namespace": "windows",
"types": [
{

Powered by Google App Engine
This is Rietveld 408576698