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

Side by Side Diff: third_party/closure_compiler/externs/settings_private.js

Issue 1015623005: chrome.settingsPrivate: Basic stub implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Some small cleanups 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 /** @fileoverview Externs generated from namespace: settingsPrivate */
Jeremy Klein 2015/03/20 22:06:42 @externs
Oren Blasberg 2015/03/20 23:30:30 Done.
Oren Blasberg 2015/03/20 23:30:31 Done.
6
7 /**
8 * @enum {string}
9 */
10 chrome.settingsPrivate.PrefType = {
stevenjb 2015/03/20 21:53:48 With networkingPrivate, it seems that the extensio
Oren Blasberg 2015/03/20 23:30:30 Done.
11 BOOLEAN: 'boolean',
12 NONE: 'none',
13 NUMBER: 'number',
14 STRING: 'string',
15 URL: 'url'
16 };
17
18 /**
19 * @enum {string}
20 */
21 chrome.settingsPrivate.PrefSource = {
Jeremy Klein 2015/03/20 22:06:42 These enums shouldn't really be in externs because
Oren Blasberg 2015/03/20 23:30:30 Done.
Oren Blasberg 2015/03/20 23:30:31 As discussed offline we will keep these since C++
22 DEVICE: 'device',
23 NONE: 'none',
24 USER: 'user'
25 };
26
27 /**
28 * @typedef {{
29 * key: string,
30 * type: chrome.settingsPrivate.PrefType,
31 * value: *,
32 * source: chrome.settingsPrivate.PrefSource
33 * }}
34 */
35 var PrefObject;
stevenjb 2015/03/20 21:53:48 Shouldn't these be chrome.settingsPrivate.PrefObje
Jeremy Klein 2015/03/20 22:06:42 +1. Check out some of the typedefs in https://code
Oren Blasberg 2015/03/20 23:30:30 Done.
36
37 /**
38 * @typedef {function(success)}
39 */
40 var OnPrefSetCallback;
41
42 /**
43 * @typedef {function(!Array<PrefObject>)}
44 */
45 var GetAllPrefsCallback;
46
47 /**
48 * @typedef {function(PrefObject)}
49 */
50 var GetPrefCallback;
51
52 /**
53 * @const
54 */
55 chrome.settingsPrivate = {};
56
57 /**
58 * Sets a boolean settings value.
59 * @param {string} name
60 * @param {boolean} value
61 * @param {OnPrefSetCallback} callback
62 * @return {boolean} Returns true if |name| matches a valid key (i.e. a
63 * PrefObject key from getAllPrefs), or returns false and sets an error if
64 * it does not.
65 */
66 chrome.settingsPrivate.setBooleanPref = function(name, value) {};
67
68 /**
69 * Sets a number settings value.
70 * @param {string} name
71 * @param {number} value
72 * @param {OnPrefSetCallback} callback
73 * @return {boolean} Returns true if |name| matches a valid key (i.e. a
74 * PrefObject key from getAllPrefs), or returns false and sets an error if
75 * it does not.
76 */
77 chrome.settingsPrivate.setNumericPref = function(name, value) {};
78
79 /**
80 * Sets a string settings value.
81 * @param {string} name
82 * @param {string} value
83 * @param {OnPrefSetCallback} callback
84 * @return {boolean} Returns true if |name| matches a valid key (i.e. a
85 * PrefObject key from getAllPrefs), or returns false and sets an error if
86 * it does not.
87 */
88 chrome.settingsPrivate.setStringPref = function(name, value) {};
89
90 /**
91 * Sets a URL settings value.
92 * @param {string} name
93 * @param {string} value
94 * @param {OnPrefSetCallback} callback
95 * @return {boolean} Returns true if |name| matches a valid key (i.e. a
96 * PrefObject key from getAllPrefs), or returns false and sets an error if
97 * it does not.
98 */
99 chrome.settingsPrivate.setURLPref = function(name, value) {};
100
101 /**
102 * Gets all the prefs.
103 * @param {GetAllPrefsCallback} callback
104 */
105 chrome.settingsPrivate.getAllPrefs = function(callback) {};
106
107 /**
108 * Gets the value of a specific pref.
109 * @param {string} name
110 * @param {GetPrefCallback} callback
111 */
112 chrome.settingsPrivate.getPref = function(name, callback) {};
113
114 /** @type {!ChromeEvent} */
115 chrome.settingsPrivate.onPrefsChanged;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698