OLD | NEW |
| 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 // This file was generated by: |
| 6 // ./tools/json_schema_compiler/compiler.py. |
| 7 // NOTE: The format of types has changed. 'FooType' is now |
| 8 // 'chrome.settingsPrivate.FooType'. |
| 9 // Please run the closure compiler before committing changes. |
| 10 // See https://code.google.com/p/chromium/wiki/ClosureCompilation. |
| 11 |
1 /** @fileoverview Externs generated from namespace: settingsPrivate */ | 12 /** @fileoverview Externs generated from namespace: settingsPrivate */ |
2 | 13 |
3 /** | 14 /** |
4 * @const | 15 * @const |
5 */ | 16 */ |
6 chrome.settingsPrivate = {}; | 17 chrome.settingsPrivate = {}; |
7 | 18 |
8 /** | 19 /** |
9 * @enum {string} | 20 * @enum {string} |
10 * @see https://developer.chrome.com/extensions/settingsPrivate#type-PrefType | 21 * @see https://developer.chrome.com/extensions/settingsPrivate#type-PrefType |
11 */ | 22 */ |
12 chrome.settingsPrivate.PrefType = { | 23 chrome.settingsPrivate.PrefType = { |
13 BOOLEAN: 'BOOLEAN', | 24 BOOLEAN: 'BOOLEAN', |
14 NUMBER: 'NUMBER', | 25 NUMBER: 'NUMBER', |
15 STRING: 'STRING', | 26 STRING: 'STRING', |
16 URL: 'URL', | 27 URL: 'URL', |
17 LIST: 'LIST', | 28 LIST: 'LIST', |
18 }; | 29 }; |
19 | 30 |
20 /** | 31 /** |
21 * @enum {string} | 32 * @enum {string} |
22 * @see https://developer.chrome.com/extensions/settingsPrivate#type-PolicySourc
e | 33 * @see https://developer.chrome.com/extensions/settingsPrivate#type-PolicySourc
e |
23 */ | 34 */ |
24 chrome.settingsPrivate.PolicySource = { | 35 chrome.settingsPrivate.PolicySource = { |
25 DEVICE: 'DEVICE', | 36 DEVICE: 'DEVICE', |
26 USER: 'USER', | 37 USER: 'USER', |
| 38 OWNER: 'OWNER', |
| 39 PRIMARY_USER: 'PRIMARY_USER', |
| 40 EXTENSION: 'EXTENSION', |
27 }; | 41 }; |
28 | 42 |
29 /** | 43 /** |
30 * @enum {string} | 44 * @enum {string} |
31 * @see https://developer.chrome.com/extensions/settingsPrivate#type-PolicyEnfor
cement | 45 * @see https://developer.chrome.com/extensions/settingsPrivate#type-PolicyEnfor
cement |
32 */ | 46 */ |
33 chrome.settingsPrivate.PolicyEnforcement = { | 47 chrome.settingsPrivate.PolicyEnforcement = { |
34 ENFORCED: 'ENFORCED', | 48 ENFORCED: 'ENFORCED', |
35 RECOMMENDED: 'RECOMMENDED', | 49 RECOMMENDED: 'RECOMMENDED', |
36 }; | 50 }; |
37 | 51 |
38 /** | 52 /** |
39 * @typedef {{ | 53 * @typedef {{ |
40 * key: string, | 54 * key: string, |
41 * type: !chrome.settingsPrivate.PrefType, | 55 * type: !chrome.settingsPrivate.PrefType, |
42 * value: *, | 56 * value: *, |
43 * policySource: (!chrome.settingsPrivate.PolicySource|undefined), | 57 * policySource: (!chrome.settingsPrivate.PolicySource|undefined), |
44 * policyEnforcement: (!chrome.settingsPrivate.PolicyEnforcement|undefined) | 58 * policyEnforcement: (!chrome.settingsPrivate.PolicyEnforcement|undefined), |
| 59 * recommendedValue: (*|undefined) |
45 * }} | 60 * }} |
46 * @see https://developer.chrome.com/extensions/settingsPrivate#type-PrefObject | 61 * @see https://developer.chrome.com/extensions/settingsPrivate#type-PrefObject |
47 */ | 62 */ |
48 var PrefObject; | 63 chrome.settingsPrivate.PrefObject; |
49 | 64 |
50 /** | 65 /** |
51 * Sets a settings value. | 66 * Sets a settings value. |
52 * @param {string} name The name of the pref. | 67 * @param {string} name The name of the pref. |
53 * @param {*} value The new value of the pref. | 68 * @param {*} value The new value of the pref. |
54 * @param {string} pageId The user metrics identifier or null. | 69 * @param {string} pageId The user metrics identifier or null. |
55 * @param {function(boolean):void} callback The callback for whether the pref | 70 * @param {function(boolean):void} callback The callback for whether the pref |
56 * was set or not. | 71 * was set or not. |
57 * @see https://developer.chrome.com/extensions/settingsPrivate#method-setPref | 72 * @see https://developer.chrome.com/extensions/settingsPrivate#method-setPref |
58 */ | 73 */ |
59 chrome.settingsPrivate.setPref = function(name, value, pageId, callback) {}; | 74 chrome.settingsPrivate.setPref = function(name, value, pageId, callback) {}; |
60 | 75 |
61 /** | 76 /** |
62 * Gets an array of all the prefs. | 77 * Gets an array of all the prefs. |
63 * @param {function(!Array<PrefObject>):void} callback | 78 * @param {function(!Array<!chrome.settingsPrivate.PrefObject>):void} callback |
64 * @see https://developer.chrome.com/extensions/settingsPrivate#method-getAllPre
fs | 79 * @see https://developer.chrome.com/extensions/settingsPrivate#method-getAllPre
fs |
65 */ | 80 */ |
66 chrome.settingsPrivate.getAllPrefs = function(callback) {}; | 81 chrome.settingsPrivate.getAllPrefs = function(callback) {}; |
67 | 82 |
68 /** | 83 /** |
69 * Gets the value of a specific pref. | 84 * Gets the value of a specific pref. |
70 * @param {string} name | 85 * @param {string} name |
71 * @param {function(PrefObject):void} callback | 86 * @param {function(!chrome.settingsPrivate.PrefObject):void} callback |
72 * @see https://developer.chrome.com/extensions/settingsPrivate#method-getPref | 87 * @see https://developer.chrome.com/extensions/settingsPrivate#method-getPref |
73 */ | 88 */ |
74 chrome.settingsPrivate.getPref = function(name, callback) {}; | 89 chrome.settingsPrivate.getPref = function(name, callback) {}; |
75 | 90 |
76 /** | 91 /** |
77 * <p>Fired when a set of prefs has changed.</p><p>|prefs| The prefs that | 92 * <p>Fired when a set of prefs has changed.</p><p>|prefs| The prefs that |
78 * changed.</p> | 93 * changed.</p> |
79 * @type {!ChromeEvent} | 94 * @type {!ChromeEvent} |
80 * @see https://developer.chrome.com/extensions/settingsPrivate#event-onPrefsCha
nged | 95 * @see https://developer.chrome.com/extensions/settingsPrivate#event-onPrefsCha
nged |
81 */ | 96 */ |
82 chrome.settingsPrivate.onPrefsChanged; | 97 chrome.settingsPrivate.onPrefsChanged; |
OLD | NEW |