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 // TODO(mahmadi): start the tutorial if the location hash is #tutorial. | 60 if (window.location.hash == '#tutorial') |
| 61 document.querySelector('user-manager-tutorial').startTutorial(); |
61 }; | 62 }; |
62 | 63 |
63 /** | 64 /** |
64 * Open a new browser for the given profile. | 65 * Open a new browser for the given profile. |
65 * @param {string} profilePath The profile's path. | 66 * @param {string} profilePath The profile's path. |
66 */ | 67 */ |
67 UserManager.launchUser = function(profilePath) { | 68 UserManager.launchUser = function(profilePath) { |
68 signin.ProfileBrowserProxyImpl.getInstance().launchUser(profilePath); | 69 signin.ProfileBrowserProxyImpl.getInstance().launchUser(profilePath); |
69 }; | 70 }; |
70 | 71 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 // Allow selection events on components with editable text (password field) | 114 // Allow selection events on components with editable text (password field) |
114 // bug (http://code.google.com/p/chromium/issues/detail?id=125863) | 115 // bug (http://code.google.com/p/chromium/issues/detail?id=125863) |
115 disableTextSelectAndDrag(function(e) { | 116 disableTextSelectAndDrag(function(e) { |
116 var src = e.target; | 117 var src = e.target; |
117 return src instanceof HTMLTextAreaElement || | 118 return src instanceof HTMLTextAreaElement || |
118 src instanceof HTMLInputElement && | 119 src instanceof HTMLInputElement && |
119 /text|password|search/.test(src.type); | 120 /text|password|search/.test(src.type); |
120 }); | 121 }); |
121 | 122 |
122 document.addEventListener('DOMContentLoaded', cr.ui.UserManager.initialize); | 123 document.addEventListener('DOMContentLoaded', cr.ui.UserManager.initialize); |
OLD | NEW |