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

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

Issue 2539733004: MD Settings: Overhaul Easy Unlock Turn Off Dialog. (Closed)
Patch Set: Created 4 years 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 * True if Easy Unlock's proximity detection feature is allowed. 110 * True if Easy Unlock's proximity detection feature is allowed.
111 */ 111 */
112 easyUnlockProximityDetectionAllowed_: { 112 easyUnlockProximityDetectionAllowed_: {
113 type: Boolean, 113 type: Boolean,
114 value: function() { 114 value: function() {
115 return loadTimeData.getBoolean('easyUnlockAllowed') && 115 return loadTimeData.getBoolean('easyUnlockAllowed') &&
116 loadTimeData.getBoolean('easyUnlockProximityDetectionAllowed'); 116 loadTimeData.getBoolean('easyUnlockProximityDetectionAllowed');
117 }, 117 },
118 readOnly: true, 118 readOnly: true,
119 }, 119 },
120
121 /** @private */
122 showEasyUnlockTurnOffDialog_: {
123 type: Boolean,
124 value: false,
125 },
120 </if> 126 </if>
121 }, 127 },
122 128
123 /** @override */ 129 /** @override */
124 attached: function() { 130 attached: function() {
125 var profileInfoProxy = settings.ProfileInfoBrowserProxyImpl.getInstance(); 131 var profileInfoProxy = settings.ProfileInfoBrowserProxyImpl.getInstance();
126 profileInfoProxy.getProfileInfo().then(this.handleProfileInfo_.bind(this)); 132 profileInfoProxy.getProfileInfo().then(this.handleProfileInfo_.bind(this));
127 this.addWebUIListener('profile-info-changed', 133 this.addWebUIListener('profile-info-changed',
128 this.handleProfileInfo_.bind(this)); 134 this.handleProfileInfo_.bind(this));
129 135
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 this.syncStatus = syncStatus; 217 this.syncStatus = syncStatus;
212 }, 218 },
213 219
214 <if expr="chromeos"> 220 <if expr="chromeos">
215 /** 221 /**
216 * Handler for when the Easy Unlock enabled status has changed. 222 * Handler for when the Easy Unlock enabled status has changed.
217 * @private 223 * @private
218 */ 224 */
219 handleEasyUnlockEnabledStatusChanged_: function(easyUnlockEnabled) { 225 handleEasyUnlockEnabledStatusChanged_: function(easyUnlockEnabled) {
220 this.easyUnlockEnabled_ = easyUnlockEnabled; 226 this.easyUnlockEnabled_ = easyUnlockEnabled;
227 this.showEasyUnlockTurnOffDialog_ =
228 easyUnlockEnabled && this.showEasyUnlockTurnOffDialog_;
221 }, 229 },
222 </if> 230 </if>
223 231
224 /** @private */ 232 /** @private */
225 onPictureTap_: function() { 233 onPictureTap_: function() {
226 <if expr="chromeos"> 234 <if expr="chromeos">
227 settings.navigateTo(settings.Route.CHANGE_PICTURE); 235 settings.navigateTo(settings.Route.CHANGE_PICTURE);
228 </if> 236 </if>
229 <if expr="not chromeos"> 237 <if expr="not chromeos">
230 settings.navigateTo(settings.Route.MANAGE_PROFILE); 238 settings.navigateTo(settings.Route.MANAGE_PROFILE);
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 settings.navigateTo(settings.Route.LOCK_SCREEN); 330 settings.navigateTo(settings.Route.LOCK_SCREEN);
323 }, 331 },
324 332
325 /** @private */ 333 /** @private */
326 onEasyUnlockSetupTap_: function() { 334 onEasyUnlockSetupTap_: function() {
327 this.easyUnlockBrowserProxy_.startTurnOnFlow(); 335 this.easyUnlockBrowserProxy_.startTurnOnFlow();
328 }, 336 },
329 337
330 /** @private */ 338 /** @private */
331 onEasyUnlockTurnOffTap_: function() { 339 onEasyUnlockTurnOffTap_: function() {
332 this.$$('#easyUnlockTurnOffDialog').open(); 340 this.showEasyUnlockTurnOffDialog_ = true;
341 },
342
343 /** @private */
344 onEasyUnlockTurnOffDialogClose_: function() {
345 this.showEasyUnlockTurnOffDialog_ = false;
333 }, 346 },
334 </if> 347 </if>
335 348
336 /** @private */ 349 /** @private */
337 onManageOtherPeople_: function() { 350 onManageOtherPeople_: function() {
338 <if expr="not chromeos"> 351 <if expr="not chromeos">
339 this.syncBrowserProxy_.manageOtherPeople(); 352 this.syncBrowserProxy_.manageOtherPeople();
340 </if> 353 </if>
341 <if expr="chromeos"> 354 <if expr="chromeos">
342 settings.navigateTo(settings.Route.ACCOUNTS); 355 settings.navigateTo(settings.Route.ACCOUNTS);
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 463
451 /** 464 /**
452 * @param {!settings.SyncStatus} syncStatus 465 * @param {!settings.SyncStatus} syncStatus
453 * @return {boolean} Whether to show the "Sign in to Chrome" button. 466 * @return {boolean} Whether to show the "Sign in to Chrome" button.
454 * @private 467 * @private
455 */ 468 */
456 showSignin_: function(syncStatus) { 469 showSignin_: function(syncStatus) {
457 return !!syncStatus.signinAllowed && !syncStatus.signedIn; 470 return !!syncStatus.signinAllowed && !syncStatus.signedIn;
458 }, 471 },
459 }); 472 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698