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.
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.
12 /** @fileoverview Externs generated from namespace: settingsPrivate */
17 chrome.settingsPrivate = {};
21 * @see https://developer.chrome.com/extensions/settingsPrivate#type-PrefType
23 chrome.settingsPrivate.PrefType = {
33 * @see https://developer.chrome.com/extensions/settingsPrivate#type-PolicySource
35 chrome.settingsPrivate.PolicySource = {
36 DEVICE_POLICY: 'DEVICE_POLICY',
37 USER_POLICY: 'USER_POLICY',
39 PRIMARY_USER: 'PRIMARY_USER',
40 EXTENSION: 'EXTENSION',
45 * @see https://developer.chrome.com/extensions/settingsPrivate#type-PolicyEnforcement
47 chrome.settingsPrivate.PolicyEnforcement = {
49 RECOMMENDED: 'RECOMMENDED',
55 * type: !chrome.settingsPrivate.PrefType,
57 * policySource: (!chrome.settingsPrivate.PolicySource|undefined),
58 * policyEnforcement: (!chrome.settingsPrivate.PolicyEnforcement|undefined),
59 * recommendedValue: (*|undefined),
60 * extensionId: (string|undefined),
61 * readOnly: (boolean|undefined)
63 * @see https://developer.chrome.com/extensions/settingsPrivate#type-PrefObject
65 chrome.settingsPrivate.PrefObject;
68 * Sets a settings value.
69 * @param {string} name The name of the pref.
70 * @param {*} value The new value of the pref.
71 * @param {string} pageId The user metrics identifier or null.
72 * @param {function(boolean):void} callback The callback for whether the pref
74 * @see https://developer.chrome.com/extensions/settingsPrivate#method-setPref
76 chrome.settingsPrivate.setPref = function(name, value, pageId, callback) {};
79 * Gets an array of all the prefs.
80 * @param {function(!Array<!chrome.settingsPrivate.PrefObject>):void} callback
81 * @see https://developer.chrome.com/extensions/settingsPrivate#method-getAllPrefs
83 chrome.settingsPrivate.getAllPrefs = function(callback) {};
86 * Gets the value of a specific pref.
87 * @param {string} name
88 * @param {function(!chrome.settingsPrivate.PrefObject):void} callback
89 * @see https://developer.chrome.com/extensions/settingsPrivate#method-getPref
91 chrome.settingsPrivate.getPref = function(name, callback) {};
94 * <p>Fired when a set of prefs has changed.</p><p>|prefs| The prefs that
96 * @type {!ChromeEvent}
97 * @see https://developer.chrome.com/extensions/settingsPrivate#event-onPrefsChanged
99 chrome.settingsPrivate.onPrefsChanged;