OLD | NEW |
1 /* Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 * found in the LICENSE file. */ | 3 // found in the LICENSE file. |
4 | 4 |
5 /** | 5 /** |
6 * @fileoverview | 6 * @fileoverview |
7 * 'settings-prefs' exposes a singleton model of Chrome settings and | 7 * 'settings-prefs' exposes a singleton model of Chrome settings and |
8 * preferences, which listens to changes to Chrome prefs whitelisted in | 8 * preferences, which listens to changes to Chrome prefs whitelisted in |
9 * chrome.settingsPrivate. When changing prefs in this element's 'prefs' | 9 * chrome.settingsPrivate. When changing prefs in this element's 'prefs' |
10 * property via the UI, the singleton model tries to set those preferences in | 10 * property via the UI, the singleton model tries to set those preferences in |
11 * Chrome. Whether or not the calls to settingsPrivate.setPref succeed, 'prefs' | 11 * Chrome. Whether or not the calls to settingsPrivate.setPref succeed, 'prefs' |
12 * is eventually consistent with the Chrome pref store. | 12 * is eventually consistent with the Chrome pref store. |
13 */ | 13 */ |
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 this.prefs = undefined; | 305 this.prefs = undefined; |
306 this.lastPrefValues_ = {}; | 306 this.lastPrefValues_ = {}; |
307 this.initialized_ = false; | 307 this.initialized_ = false; |
308 // Remove the listener added in initialize(). | 308 // Remove the listener added in initialize(). |
309 this.settingsApi_.onPrefsChanged.removeListener(this.boundPrefsChanged_); | 309 this.settingsApi_.onPrefsChanged.removeListener(this.boundPrefsChanged_); |
310 this.settingsApi_ = | 310 this.settingsApi_ = |
311 /** @type {SettingsPrivate} */(chrome.settingsPrivate); | 311 /** @type {SettingsPrivate} */(chrome.settingsPrivate); |
312 }, | 312 }, |
313 }); | 313 }); |
314 })(); | 314 })(); |
OLD | NEW |