Chromium Code Reviews| OLD | NEW |
|---|---|
| 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"> |
| (...skipping 29 matching lines...) Expand all Loading... | |
| 40 data: {disableAddUser: false}}); | 40 data: {disableAddUser: false}}); |
| 41 // Hide control options if the user does not have the right permissions. | 41 // Hide control options if the user does not have the right permissions. |
| 42 var controlBar = document.querySelector('control-bar'); | 42 var controlBar = document.querySelector('control-bar'); |
| 43 controlBar.showGuest = showGuest; | 43 controlBar.showGuest = showGuest; |
| 44 controlBar.showAddPerson = showAddPerson; | 44 controlBar.showAddPerson = showAddPerson; |
| 45 | 45 |
| 46 // Disable the context menu, as the Print/Inspect element items don't | 46 // Disable the context menu, as the Print/Inspect element items don't |
| 47 // make sense when displayed as a widget. | 47 // make sense when displayed as a widget. |
| 48 document.addEventListener('contextmenu', function(e) {e.preventDefault();}); | 48 document.addEventListener('contextmenu', function(e) {e.preventDefault();}); |
| 49 | 49 |
| 50 // TODO(mahmadi): start the tutorial if the location hash is #tutorial. | 50 var hash = window.location.hash; |
| 51 if (hash && hash == '#tutorial') | |
|
Dan Beam
2016/02/25 17:22:07
why is this code better than
if (window.locatio
Moe
2016/03/02 18:25:52
The check is unnecessary. I agree. I reintroduced
| |
| 52 document.querySelector('user-manager-tutorial').startTutorial(); | |
| 51 }; | 53 }; |
| 52 | 54 |
| 53 /** | 55 /** |
| 54 * Open a new browser for the given profile. | 56 * Open a new browser for the given profile. |
| 55 * @param {string} profilePath The profile's path. | 57 * @param {string} profilePath The profile's path. |
| 56 */ | 58 */ |
| 57 Oobe.launchUser = function(profilePath) { | 59 Oobe.launchUser = function(profilePath) { |
| 58 chrome.send('launchUser', [profilePath]); | 60 chrome.send('launchUser', [profilePath]); |
| 59 }; | 61 }; |
| 60 | 62 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 102 * Restores input focus to currently selected pod. | 104 * Restores input focus to currently selected pod. |
| 103 */ | 105 */ |
| 104 Oobe.refocusCurrentPod = function() { | 106 Oobe.refocusCurrentPod = function() { |
| 105 DisplayManager.refocusCurrentPod(); | 107 DisplayManager.refocusCurrentPod(); |
| 106 }; | 108 }; |
| 107 | 109 |
| 108 /** | 110 /** |
| 109 * Show the user manager tutorial | 111 * Show the user manager tutorial |
| 110 */ | 112 */ |
| 111 Oobe.showUserManagerTutorial = function() { | 113 Oobe.showUserManagerTutorial = function() { |
| 112 // TODO(mahmadi): start the tutorial. | 114 document.querySelector('user-manager-tutorial').startTutorial(); |
| 113 }; | 115 }; |
| 114 | 116 |
| 115 // Export | 117 // Export |
| 116 return { | 118 return { |
| 117 Oobe: Oobe | 119 Oobe: Oobe |
| 118 }; | 120 }; |
| 119 }); | 121 }); |
| 120 | 122 |
| 121 cr.define('UserManager', function() { | 123 cr.define('UserManager', function() { |
| 122 'use strict'; | 124 'use strict'; |
| (...skipping 17 matching lines...) Expand all Loading... | |
| 140 // Allow selection events on components with editable text (password field) | 142 // Allow selection events on components with editable text (password field) |
| 141 // bug (http://code.google.com/p/chromium/issues/detail?id=125863) | 143 // bug (http://code.google.com/p/chromium/issues/detail?id=125863) |
| 142 disableTextSelectAndDrag(function(e) { | 144 disableTextSelectAndDrag(function(e) { |
| 143 var src = e.target; | 145 var src = e.target; |
| 144 return src instanceof HTMLTextAreaElement || | 146 return src instanceof HTMLTextAreaElement || |
| 145 src instanceof HTMLInputElement && | 147 src instanceof HTMLInputElement && |
| 146 /text|password|search/.test(src.type); | 148 /text|password|search/.test(src.type); |
| 147 }); | 149 }); |
| 148 | 150 |
| 149 document.addEventListener('DOMContentLoaded', UserManager.initialize); | 151 document.addEventListener('DOMContentLoaded', UserManager.initialize); |
| OLD | NEW |