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

Side by Side Diff: chrome/browser/resources/md_user_manager/user_manager.js

Issue 1642323004: User Manager MD User Pods (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed pasha's comments Created 4 years, 10 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 <include src="../../../../ui/login/screen.js"> 5 <include src="../../../../ui/login/screen.js">
6 <include src="../../../../ui/login/bubble.js"> 6 <include src="../../../../ui/login/bubble.js">
7 <include src="../../../../ui/login/login_ui_tools.js"> 7 <include src="../../../../ui/login/login_ui_tools.js">
8 <include src="../../../../ui/login/display_manager.js"> 8 <include src="../../../../ui/login/display_manager.js">
9 <include src="../../../../ui/login/account_picker/screen_account_picker.js"> 9 <include src="../../../../ui/login/account_picker/screen_account_picker.js">
10 <include src="../../../../ui/login/account_picker/user_pod_row.js"> 10 <include src="../../../../ui/login/account_picker/user_pod_row.js">
11 <include src="../../../../ui/login/resource_loader.js"> 11 <include src="../../../../ui/login/resource_loader.js">
12 12
13 13
14 cr.define('cr.ui', function() { 14 cr.define('cr.ui', function() {
15 var DisplayManager = cr.ui.login.DisplayManager; 15 var DisplayManager = cr.ui.login.DisplayManager;
16 16
17 /** 17 /**
18 * Constructs an Out of box controller. It manages initialization of screens, 18 * Constructs an Out of box controller. It manages initialization of screens,
19 * transitions, error messages display. 19 * transitions, error messages display.
20 * @constructor 20 * @constructor
21 * @extends {DisplayManager} 21 * @extends {DisplayManager}
22 */ 22 */
23 function Oobe() {} 23 function Oobe() {}
24 24
25 cr.addSingletonGetter(Oobe); 25 cr.addSingletonGetter(Oobe);
26 26
27 Oobe.prototype = { 27 Oobe.prototype = {
28 __proto__: DisplayManager.prototype, 28 __proto__: DisplayManager.prototype,
29
30 /**
31 * Overrides clientAreaSize in DisplayManager. When a new profile is created
32 * the #outer-container page may not be visible yet, so user-pods cannot be
33 * placed correctly. In that case we use dimensions of the #animated-pages.
34 * @type {{width:string, height:string}}
35 */
36 get clientAreaSize() {
37 width = $('outer-container').offsetWidth ||
tommycli 2016/02/20 00:36:39 Do you mean to declare globals here?
Moe 2016/02/22 14:46:46 Done. Added var.
38 $('animated-pages').offsetWidth;
39 // Deduct the maximum possible height of the #login-header-bar (including
40 // the padding and the border) from the height of #animated-pages. Result
41 // is the remaining visible height.
42 height = $('outer-container').offsetHeight ||
43 $('animated-pages').offsetHeight - 57;
44 return {width: width, height: height};
45 }
29 }; 46 };
30 47
31 /** 48 /**
32 * Shows the given screen. 49 * Shows the given screen.
33 * @param {boolean} showGuest True if |Browse as Guest| button should be 50 * @param {boolean} showGuest True if |Browse as Guest| button should be
34 * displayed. 51 * displayed.
35 * @param {boolean} showAddPerson True if |Add Person| button should be 52 * @param {boolean} showAddPerson True if |Add Person| button should be
36 * displayed. 53 * displayed.
37 */ 54 */
38 Oobe.showUserManagerScreen = function(showGuest, showAddPerson) { 55 Oobe.showUserManagerScreen = function(showGuest, showAddPerson) {
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 // Allow selection events on components with editable text (password field) 159 // Allow selection events on components with editable text (password field)
143 // bug (http://code.google.com/p/chromium/issues/detail?id=125863) 160 // bug (http://code.google.com/p/chromium/issues/detail?id=125863)
144 disableTextSelectAndDrag(function(e) { 161 disableTextSelectAndDrag(function(e) {
145 var src = e.target; 162 var src = e.target;
146 return src instanceof HTMLTextAreaElement || 163 return src instanceof HTMLTextAreaElement ||
147 src instanceof HTMLInputElement && 164 src instanceof HTMLInputElement &&
148 /text|password|search/.test(src.type); 165 /text|password|search/.test(src.type);
149 }); 166 });
150 167
151 document.addEventListener('DOMContentLoaded', UserManager.initialize); 168 document.addEventListener('DOMContentLoaded', UserManager.initialize);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698