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

Side by Side Diff: chrome/browser/resources/settings/people_page/people_page.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-people-page' is the settings page containing sign-in settings. 7 * 'settings-people-page' is the settings page containing sign-in settings.
8 */ 8 */
9 Polymer({ 9 Polymer({
10 is: 'settings-people-page', 10 is: 'settings-people-page',
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 deleteProfile_: Boolean, 66 deleteProfile_: Boolean,
67 67
68 // <if expr="not chromeos"> 68 // <if expr="not chromeos">
69 /** @private */ 69 /** @private */
70 showImportDataDialog_: { 70 showImportDataDialog_: {
71 type: Boolean, 71 type: Boolean,
72 value: false, 72 value: false,
73 }, 73 },
74 // </if> 74 // </if>
75 75
76 /** @private {!settings.SyncBrowserProxy} */
77 syncBrowserProxy_: {
78 type: Object,
79 value: function() {
80 return settings.SyncBrowserProxyImpl.getInstance();
81 },
82 },
83
84 /** @private */ 76 /** @private */
85 showDisconnectDialog_: Boolean, 77 showDisconnectDialog_: Boolean,
86 78
87 // <if expr="chromeos"> 79 // <if expr="chromeos">
88 /** 80 /**
89 * True if quick unlock settings should be displayed on this machine. 81 * True if quick unlock settings should be displayed on this machine.
90 * @private 82 * @private
91 */ 83 */
92 quickUnlockEnabled_: { 84 quickUnlockEnabled_: {
93 type: Boolean, 85 type: Boolean,
(...skipping 25 matching lines...) Expand all
119 settings.Route.LOCK_SCREEN.path, '#lockScreenSubpageTrigger'); 111 settings.Route.LOCK_SCREEN.path, '#lockScreenSubpageTrigger');
120 map.set( 112 map.set(
121 settings.Route.ACCOUNTS.path, 113 settings.Route.ACCOUNTS.path,
122 '#manage-other-people-subpage-trigger .subpage-arrow'); 114 '#manage-other-people-subpage-trigger .subpage-arrow');
123 // </if> 115 // </if>
124 return map; 116 return map;
125 }, 117 },
126 }, 118 },
127 }, 119 },
128 120
121 /** @private {?settings.SyncBrowserProxy} */
122 syncBrowserProxy_: null,
123
129 /** @override */ 124 /** @override */
130 attached: function() { 125 attached: function() {
131 var profileInfoProxy = settings.ProfileInfoBrowserProxyImpl.getInstance(); 126 var profileInfoProxy = settings.ProfileInfoBrowserProxyImpl.getInstance();
132 profileInfoProxy.getProfileInfo().then(this.handleProfileInfo_.bind(this)); 127 profileInfoProxy.getProfileInfo().then(this.handleProfileInfo_.bind(this));
133 this.addWebUIListener('profile-info-changed', 128 this.addWebUIListener('profile-info-changed',
134 this.handleProfileInfo_.bind(this)); 129 this.handleProfileInfo_.bind(this));
135 130
136 profileInfoProxy.getProfileManagesSupervisedUsers().then( 131 profileInfoProxy.getProfileManagesSupervisedUsers().then(
137 this.handleProfileManagesSupervisedUsers_.bind(this)); 132 this.handleProfileManagesSupervisedUsers_.bind(this));
138 this.addWebUIListener('profile-manages-supervised-users-changed', 133 this.addWebUIListener('profile-manages-supervised-users-changed',
139 this.handleProfileManagesSupervisedUsers_.bind(this)); 134 this.handleProfileManagesSupervisedUsers_.bind(this));
140 135
141 this.addWebUIListener('profile-stats-count-ready', 136 this.addWebUIListener('profile-stats-count-ready',
142 this.handleProfileStatsCount_.bind(this)); 137 this.handleProfileStatsCount_.bind(this));
143 138
139 this.syncBrowserProxy_ = settings.SyncBrowserProxyImpl.getInstance();
144 this.syncBrowserProxy_.getSyncStatus().then( 140 this.syncBrowserProxy_.getSyncStatus().then(
145 this.handleSyncStatus_.bind(this)); 141 this.handleSyncStatus_.bind(this));
146 this.addWebUIListener('sync-status-changed', 142 this.addWebUIListener('sync-status-changed',
147 this.handleSyncStatus_.bind(this)); 143 this.handleSyncStatus_.bind(this));
148 }, 144 },
149 145
150 /** @protected */ 146 /** @protected */
151 currentRouteChanged: function() { 147 currentRouteChanged: function() {
152 this.showImportDataDialog_ = 148 this.showImportDataDialog_ =
153 settings.getCurrentRoute() == settings.Route.IMPORT_DATA; 149 settings.getCurrentRoute() == settings.Route.IMPORT_DATA;
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 451
456 /** 452 /**
457 * @param {!settings.SyncStatus} syncStatus 453 * @param {!settings.SyncStatus} syncStatus
458 * @return {boolean} Whether to show the "Sign in to Chrome" button. 454 * @return {boolean} Whether to show the "Sign in to Chrome" button.
459 * @private 455 * @private
460 */ 456 */
461 showSignin_: function(syncStatus) { 457 showSignin_: function(syncStatus) {
462 return !!syncStatus.signinAllowed && !syncStatus.signedIn; 458 return !!syncStatus.signinAllowed && !syncStatus.signedIn;
463 }, 459 },
464 }); 460 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698