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

Unified Diff: ui/login/account_picker/md_screen_account_picker.js

Issue 2875513002: Single user pod implementation for new login screen (Closed)
Patch Set: Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: ui/login/account_picker/md_screen_account_picker.js
diff --git a/ui/login/account_picker/md_screen_account_picker.js b/ui/login/account_picker/md_screen_account_picker.js
index 1db4ae69288300816650d1b984eccca5fcd7cfa6..109add1e40064d70221cd18369f8a9524c1c954c 100644
--- a/ui/login/account_picker/md_screen_account_picker.js
+++ b/ui/login/account_picker/md_screen_account_picker.js
@@ -151,6 +151,13 @@ login.createScreen('AccountPickerScreen', 'account-picker', function() {
chrome.send('accountPickerReady');
chrome.send('loginVisible', ['account-picker']);
});
+
+ // Add a dark background behind the page if material-design is enabled.
+ var shield = document.querySelector('#oobe-shield');
+ if (loadTimeData.getString('newOobeUI') == 'on')
jdufault 2017/05/10 00:40:07 I'm confused - this file should not be used in oob
Wenzhao (Colin) Zang 2017/05/11 18:13:36 Yes. I removed this part.
+ shield.setAttribute('md-mode', 'true');
+ else
+ shield.removeAttribute('md-mode');
},
/**
@@ -198,20 +205,18 @@ login.createScreen('AccountPickerScreen', 'account-picker', function() {
var bubbleAnchor;
var attachment;
- if (activatedPod.pinContainer) {
- // Anchor the bubble to the input field.
- bubbleAnchor = (
- activatedPod.getElementsByClassName('auth-container'))[0];
- if (!bubbleAnchor) {
- console.error('auth-container not found!');
- bubbleAnchor = activatedPod.mainInput;
- }
+ // Anchor the bubble to the input field.
+ bubbleAnchor =
+ (activatedPod.getElementsByClassName('auth-container'))[0];
jdufault 2017/05/10 00:40:07 remove extra ()
Wenzhao (Colin) Zang 2017/05/11 18:13:36 Done.
+ if (!bubbleAnchor) {
+ console.error('auth-container not found!');
+ bubbleAnchor = activatedPod.mainInput;
+ }
+ if (activatedPod.pinContainer &&
+ activatedPod.pinContainer.style.visibility == 'visible')
attachment = cr.ui.Bubble.Attachment.RIGHT;
- } else {
- // Anchor the bubble to the pod instead of the input.
- bubbleAnchor = activatedPod;
+ else
attachment = cr.ui.Bubble.Attachment.BOTTOM;
- }
var bubble = $('bubble');

Powered by Google App Engine
This is Rietveld 408576698