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

Side by Side Diff: ui/login/account_picker/md_screen_account_picker.js

Issue 2931063004: Extract colors from wallpaper and dynamically update login screen overlay (Closed)
Patch Set: Address comments Created 3 years, 6 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 Account picker screen implementation. 6 * @fileoverview Account picker screen implementation.
7 */ 7 */
8 8
9 login.createScreen('AccountPickerScreen', 'account-picker', function() { 9 login.createScreen('AccountPickerScreen', 'account-picker', function() {
10 /** 10 /**
(...skipping 26 matching lines...) Expand all
37 'hideUserPodCustomIcon', 37 'hideUserPodCustomIcon',
38 'setUserPodFingerprintIcon', 38 'setUserPodFingerprintIcon',
39 'removeUserPodFingerprintIcon', 39 'removeUserPodFingerprintIcon',
40 'setPinEnabledForUser', 40 'setPinEnabledForUser',
41 'setAuthType', 41 'setAuthType',
42 'setTouchViewState', 42 'setTouchViewState',
43 'setPublicSessionDisplayName', 43 'setPublicSessionDisplayName',
44 'setPublicSessionLocales', 44 'setPublicSessionLocales',
45 'setPublicSessionKeyboardLayouts', 45 'setPublicSessionKeyboardLayouts',
46 'setLockScreenAppsState', 46 'setLockScreenAppsState',
47 'setOverlayColors',
47 ], 48 ],
48 49
49 preferredWidth_: 0, 50 preferredWidth_: 0,
50 preferredHeight_: 0, 51 preferredHeight_: 0,
51 52
52 // Whether this screen is shown for the first time. 53 // Whether this screen is shown for the first time.
53 firstShown_: true, 54 firstShown_: true,
54 55
55 // Whether this screen is currently being shown. 56 // Whether this screen is currently being shown.
56 showing_: false, 57 showing_: false,
(...skipping 18 matching lines...) Expand all
75 76
76 /** 77 /**
77 * Sets preferred size for account picker screen. 78 * Sets preferred size for account picker screen.
78 */ 79 */
79 setPreferredSize: function(width, height) { 80 setPreferredSize: function(width, height) {
80 this.preferredWidth_ = width; 81 this.preferredWidth_ = width;
81 this.preferredHeight_ = height; 82 this.preferredHeight_ = height;
82 }, 83 },
83 84
84 /** 85 /**
86 * Sets login screen overlay colors based on colors extracted from the
87 * wallpaper.
88 * @param {string} dmColor Color for the gradient mask.
89 * @param {string} scrollColor Color for the small pods container.
90 * @param {string} backgroundColor Color for the whole background.
91 */
92 setOverlayColors: function(dmColor, scrollColor, backgroundColor) {
jdufault 2017/06/12 21:37:29 expand dm acronym
Wenzhao (Colin) Zang 2017/06/12 23:40:35 I changed it to maskColor which may make more sens
93 $('pod-row').setOverlayColors(dmColor, scrollColor, backgroundColor);
94 },
95
96 /**
85 * When the account picker is being used to lock the screen, pressing the 97 * When the account picker is being used to lock the screen, pressing the
86 * exit accelerator key will sign out the active user as it would when 98 * exit accelerator key will sign out the active user as it would when
87 * they are signed in. 99 * they are signed in.
88 */ 100 */
89 exit: function() { 101 exit: function() {
90 // Check and disable the sign out button so that we can never have two 102 // Check and disable the sign out button so that we can never have two
91 // sign out requests generated in a row. 103 // sign out requests generated in a row.
92 if ($('pod-row').lockedPod && !$('sign-out-user-button').disabled) { 104 if ($('pod-row').lockedPod && !$('sign-out-user-button').disabled) {
93 $('sign-out-user-button').disabled = true; 105 $('sign-out-user-button').disabled = true;
94 chrome.send('signOutUser'); 106 chrome.send('signOutUser');
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 return; 512 return;
501 } 513 }
502 chrome.send('setLockScreenAppsState', 514 chrome.send('setLockScreenAppsState',
503 [LOCK_SCREEN_APPS_STATE.FOREGROUND]); 515 [LOCK_SCREEN_APPS_STATE.FOREGROUND]);
504 516
505 event.preventDefault(); 517 event.preventDefault();
506 event.stopPropagation(); 518 event.stopPropagation();
507 }, 519 },
508 }; 520 };
509 }); 521 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698