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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 data: {disableAddUser: false}}); | 50 data: {disableAddUser: false}}); |
51 // Hide control options if the user does not have the right permissions. | 51 // Hide control options if the user does not have the right permissions. |
52 var controlBar = document.querySelector('control-bar'); | 52 var controlBar = document.querySelector('control-bar'); |
53 controlBar.showGuest = showGuest; | 53 controlBar.showGuest = showGuest; |
54 controlBar.showAddPerson = showAddPerson; | 54 controlBar.showAddPerson = showAddPerson; |
55 | 55 |
56 // Disable the context menu, as the Print/Inspect element items don't | 56 // Disable the context menu, as the Print/Inspect element items don't |
57 // make sense when displayed as a widget. | 57 // make sense when displayed as a widget. |
58 document.addEventListener('contextmenu', function(e) {e.preventDefault();}); | 58 document.addEventListener('contextmenu', function(e) {e.preventDefault();}); |
59 | 59 |
60 if (window.location.hash == '#tutorial') | 60 // TODO(mahmadi): start the tutorial if the location hash is #tutorial. |
61 document.querySelector('user-manager-tutorial').startTutorial(); | |
62 }; | 61 }; |
63 | 62 |
64 /** | 63 /** |
65 * Open a new browser for the given profile. | 64 * Open a new browser for the given profile. |
66 * @param {string} profilePath The profile's path. | 65 * @param {string} profilePath The profile's path. |
67 */ | 66 */ |
68 UserManager.launchUser = function(profilePath) { | 67 UserManager.launchUser = function(profilePath) { |
69 signin.ProfileBrowserProxyImpl.getInstance().launchUser(profilePath); | 68 signin.ProfileBrowserProxyImpl.getInstance().launchUser(profilePath); |
70 }; | 69 }; |
71 | 70 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 // Allow selection events on components with editable text (password field) | 113 // Allow selection events on components with editable text (password field) |
115 // bug (http://code.google.com/p/chromium/issues/detail?id=125863) | 114 // bug (http://code.google.com/p/chromium/issues/detail?id=125863) |
116 disableTextSelectAndDrag(function(e) { | 115 disableTextSelectAndDrag(function(e) { |
117 var src = e.target; | 116 var src = e.target; |
118 return src instanceof HTMLTextAreaElement || | 117 return src instanceof HTMLTextAreaElement || |
119 src instanceof HTMLInputElement && | 118 src instanceof HTMLInputElement && |
120 /text|password|search/.test(src.type); | 119 /text|password|search/.test(src.type); |
121 }); | 120 }); |
122 | 121 |
123 document.addEventListener('DOMContentLoaded', cr.ui.UserManager.initialize); | 122 document.addEventListener('DOMContentLoaded', cr.ui.UserManager.initialize); |
OLD | NEW |