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

Side by Side Diff: chrome/browser/resources/settings/people_page/manage_profile.js

Issue 2818163002: MD Settings: Move various non-Polymer properties outside of "properties". (Closed)
Patch Set: fix tests Created 3 years, 8 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 * 'settings-manage-profile' is the settings subpage containing controls to 7 * 'settings-manage-profile' is the settings subpage containing controls to
8 * edit a profile's name, icon, and desktop shortcut. 8 * edit a profile's name, icon, and desktop shortcut.
9 */ 9 */
10 Polymer({ 10 Polymer({
(...skipping 28 matching lines...) Expand all
39 }, 39 },
40 }, 40 },
41 41
42 /** 42 /**
43 * The current sync status. 43 * The current sync status.
44 * @type {?settings.SyncStatus} 44 * @type {?settings.SyncStatus}
45 */ 45 */
46 syncStatus: Object, 46 syncStatus: Object,
47 47
48 /** 48 /**
49 * @private {!settings.ManageProfileBrowserProxy}
50 */
51 browserProxy_: {
52 type: Object,
53 value: function() {
54 return settings.ManageProfileBrowserProxyImpl.getInstance();
55 },
56 },
57
58 /**
59 * True if the profile shortcuts feature is enabled. 49 * True if the profile shortcuts feature is enabled.
60 */ 50 */
61 isProfileShortcutSettingVisible_: Boolean, 51 isProfileShortcutSettingVisible_: Boolean,
62 }, 52 },
63 53
54 /** @private {?settings.ManageProfileBrowserProxy} */
55 browserProxy_: null,
56
57 /** @override */
58 created: function() {
59 this.browserProxy_ = settings.ManageProfileBrowserProxyImpl.getInstance();
60 },
61
64 /** @override */ 62 /** @override */
65 attached: function() { 63 attached: function() {
66 var setIcons = function(icons) { 64 var setIcons = function(icons) {
67 this.availableIcons = icons; 65 this.availableIcons = icons;
68 }.bind(this); 66 }.bind(this);
69 67
70 this.addWebUIListener('available-icons-changed', setIcons); 68 this.addWebUIListener('available-icons-changed', setIcons);
71 this.browserProxy_.getAvailableIcons().then(setIcons); 69 this.browserProxy_.getAvailableIcons().then(setIcons);
72 }, 70 },
73 71
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 * @private 145 * @private
148 */ 146 */
149 onHasProfileShortcutChange_: function(event) { 147 onHasProfileShortcutChange_: function(event) {
150 if (this.hasProfileShortcut_) { 148 if (this.hasProfileShortcut_) {
151 this.browserProxy_.addProfileShortcut(); 149 this.browserProxy_.addProfileShortcut();
152 } else { 150 } else {
153 this.browserProxy_.removeProfileShortcut(); 151 this.browserProxy_.removeProfileShortcut();
154 } 152 }
155 } 153 }
156 }); 154 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698