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

Side by Side Diff: chrome/common/extensions/api/settings_private.json

Issue 1015623005: chrome.settingsPrivate: Basic stub implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update API to reflect design changes. Still error on calling method. Created 5 years, 9 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
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 [
6 {
7 "namespace": "settingsPrivate",
8 "description": "none",
9 "platforms": ["chromeos", "win", "mac", "linux"],
10 "properties": {
11 },
12 "types": [
13 {
14 "id": "PrefObject",
15 "type": "object",
16 "properties": {
17 "key": {
18 "type": "string",
19 "optional": false,
20 "description": "The key for the setting."
stevenjb 2015/03/20 15:45:29 nit: s/setting/pref throughout the descriptions. (
Oren Blasberg 2015/03/20 18:58:53 Done.
21 },
22 "type": {
23 "type": "string",
24 "optional": false,
stevenjb 2015/03/20 15:45:29 This should be an enum.
Oren Blasberg 2015/03/20 18:58:53 Done.
25 "description": "The type of the setting."
26 },
27 "value": {
28 "type": "any",
29 "optional": true,
30 "description": "The value of the setting."
stevenjb 2015/03/20 15:45:29 nit: The current value of the setting
Oren Blasberg 2015/03/20 18:58:52 Done.
31 },
32 "source": {
33 "type": "string",
34 "optional": true,
35 "enum": ["user", "device"],
stevenjb 2015/03/20 15:45:29 , "none"
Oren Blasberg 2015/03/20 18:58:52 Adding None causes a compiler error because None i
36 "description": "The source of the setting."
37 }
38 }
39 }
40 ],
41 "functions": [
42 {
43 "name": "setBooleanPref",
44 "description": "Sets a boolean settings value.",
45 "parameters": [
46 {
47 "name": "name",
48 "type": "string"
49 },
50 {
51 "name": "value",
52 "type": "boolean"
53 }
54 ],
55 "returns": {
56 "type": "boolean",
57 "description": "Returns true if |name| matches a valid key (i.e. a Pre fObject key from getAllPrefs), or returns false and sets an error if it does not ."
58 }
59 },
60 {
61 "name": "setNumericPref",
62 "description": "Sets a number settings value.",
63 "parameters": [
64 {
65 "name": "name",
66 "type": "string"
67 },
68 {
69 "name": "value",
70 "type": "number"
71 }
72 ],
73 "returns": {
74 "type": "boolean",
75 "description": "Returns true if |name| matches a valid key (i.e. a Pre fObject key from getAllPrefs), or returns false and sets an error if it does not ."
76 }
77 },
78 {
79 "name": "setStringPref",
80 "description": "Sets a string settings value.",
81 "parameters": [
82 {
83 "name": "name",
84 "type": "string"
85 },
86 {
87 "name": "value",
88 "type": "string"
89 }
90 ],
91 "returns": {
92 "type": "boolean",
93 "description": "Returns true if |name| matches a valid key (i.e. a Pre fObject key from getAllPrefs), or returns false and sets an error if it does not ."
94 }
95 },
96 {
97 "name": "getAllPrefs",
98 "description": "Gets all the prefs.",
99 "parameters": [
100 {
101 "name": "callback",
102 "type": "function",
103 "parameters": [
104 {
105 "name": "prefs",
106 "type": "array",
107 "description": "The array of prefs.",
108 "items": {
109 "$ref": "PrefObject"
110 }
111 }
112 ]
113 }
114 ]
115 }
116 ],
117 "events": [
118 {
119 "name": "onPrefsChanged",
120 "type": "function",
121 "description": "Fired when one or more preferences are changed.",
122 "parameters": [
123 {
124 "name": "prefs",
125 "type": "array",
126 "description": "The prefs that changed, containing their new values. ",
127 "items": {
128 "$ref": "PrefObject"
129 }
130 }
131 ]
132 }
133
134 ]
135 }
136 ]
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698