Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <include src="../../../../ui/login/screen.js"> | 4 <include src="../../../../ui/login/screen.js"> |
| 5 <include src="../../../../ui/login/bubble.js"> | 5 <include src="../../../../ui/login/bubble.js"> |
| 6 <include src="../../../../ui/login/login_ui_tools.js"> | 6 <include src="../../../../ui/login/login_ui_tools.js"> |
| 7 <include src="../../../../ui/login/display_manager.js"> | 7 <include src="../../../../ui/login/display_manager.js"> |
| 8 <include src="control_bar.js"> | 8 <include src="control_bar.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"> |
| (...skipping 14 matching lines...) Expand all Loading... | |
| 25 } | 25 } |
| 26 | 26 |
| 27 cr.addSingletonGetter(Oobe); | 27 cr.addSingletonGetter(Oobe); |
| 28 | 28 |
| 29 Oobe.prototype = { | 29 Oobe.prototype = { |
| 30 __proto__: DisplayManager.prototype, | 30 __proto__: DisplayManager.prototype, |
| 31 }; | 31 }; |
| 32 | 32 |
| 33 /** | 33 /** |
| 34 * Shows the given screen. | 34 * Shows the given screen. |
| 35 * @param {Object} screen Screen params dict, e.g. {id: screenId, data: data} | 35 * @param {Object} screen Screen params dict, e.g. {id: screenId, data: data} |
|
Marc Treib
2014/09/01 08:49:53
nit: The comment is inaccurate/out-of-date (not yo
Mike Lerman
2014/09/02 16:58:29
Done.
| |
| 36 */ | 36 */ |
| 37 Oobe.showUserManagerScreen = function(showGuest) { | 37 Oobe.showUserManagerScreen = function(showGuest, showAddPerson) { |
| 38 Oobe.getInstance().showScreen({id: 'account-picker', | 38 Oobe.getInstance().showScreen({id: 'account-picker', |
| 39 data: {disableAddUser: false}}); | 39 data: {disableAddUser: false}}); |
| 40 // The ChromeOS account-picker will hide the AddUser button if a user is | 40 // The ChromeOS account-picker will hide the AddUser button if a user is |
| 41 // logged in and the screen is "locked", so we must re-enabled it | 41 // logged in and the screen is "locked", so we must re-enabled it |
| 42 $('add-user-header-bar-item').hidden = false; | 42 $('add-user-header-bar-item').hidden = false; |
| 43 | 43 |
| 44 // Hide the Guest Mode option if the user is not permitted to select it. | 44 // Hide control options if the user does not have the right permissions. |
| 45 $('guest-user-button').hidden = !showGuest; | 45 $('guest-user-button').hidden = !showGuest; |
| 46 $('add-user-button').hidden = !showAddPerson; | |
| 46 $('login-header-bar').hidden = false; | 47 $('login-header-bar').hidden = false; |
| 47 | 48 |
| 48 // Disable the context menu, as the Print/Inspect element items don't | 49 // Disable the context menu, as the Print/Inspect element items don't |
| 49 // make sense when displayed as a widget. | 50 // make sense when displayed as a widget. |
| 50 document.addEventListener('contextmenu', function(e) {e.preventDefault();}); | 51 document.addEventListener('contextmenu', function(e) {e.preventDefault();}); |
| 51 | 52 |
| 52 var hash = window.location.hash; | 53 var hash = window.location.hash; |
| 53 if (hash && hash == '#tutorial') | 54 if (hash && hash == '#tutorial') |
| 54 UserManagerTutorial.startTutorial(); | 55 UserManagerTutorial.startTutorial(); |
| 55 }; | 56 }; |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 152 // Allow selection events on components with editable text (password field) | 153 // Allow selection events on components with editable text (password field) |
| 153 // bug (http://code.google.com/p/chromium/issues/detail?id=125863) | 154 // bug (http://code.google.com/p/chromium/issues/detail?id=125863) |
| 154 disableTextSelectAndDrag(function(e) { | 155 disableTextSelectAndDrag(function(e) { |
| 155 var src = e.target; | 156 var src = e.target; |
| 156 return src instanceof HTMLTextAreaElement || | 157 return src instanceof HTMLTextAreaElement || |
| 157 src instanceof HTMLInputElement && | 158 src instanceof HTMLInputElement && |
| 158 /text|password|search/.test(src.type); | 159 /text|password|search/.test(src.type); |
| 159 }); | 160 }); |
| 160 | 161 |
| 161 document.addEventListener('DOMContentLoaded', UserManager.initialize); | 162 document.addEventListener('DOMContentLoaded', UserManager.initialize); |
| OLD | NEW |