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

Side by Side Diff: chrome/browser/resources/settings/prefs/prefs.js

Issue 1379483003: Rename cr-settings-elements (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 2 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
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 * 'cr-settings-prefs' exposes a singleton model of Chrome settings and 7 * 'cr-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 *
14 * Example: 14 * Example:
15 * 15 *
16 * <cr-settings-prefs prefs="{{prefs}}"></cr-settings-prefs> 16 * <cr-settings-prefs prefs="{{prefs}}"></cr-settings-prefs>
17 * <cr-settings-checkbox pref="{{prefs.homepage_is_newtabpage}}"> 17 * <settings-checkbox pref="{{prefs.homepage_is_newtabpage}}">
18 * </cr-settings-checkbox> 18 * </settings-checkbox>
19 * 19 *
20 * @group Chrome Settings Elements 20 * @group Chrome Settings Elements
21 * @element cr-settings-prefs 21 * @element cr-settings-prefs
22 */ 22 */
23 23
24 (function() { 24 (function() {
25 'use strict'; 25 'use strict';
26 26
27 /** 27 /**
28 * Checks whether two values are recursively equal. Only compares serializable 28 * Checks whether two values are recursively equal. Only compares serializable
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 /** 404 /**
405 * Resets the element so it can be re-initialized with a new prefs state. 405 * Resets the element so it can be re-initialized with a new prefs state.
406 */ 406 */
407 resetForTesting: function() { 407 resetForTesting: function() {
408 this.prefs = undefined; 408 this.prefs = undefined;
409 this.lastPrefValues_ = {}; 409 this.lastPrefValues_ = {};
410 this.initialized_ = false; 410 this.initialized_ = false;
411 }, 411 },
412 }); 412 });
413 })(); 413 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698