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

Side by Side Diff: chrome/browser/resources/chromeos/login/header_bar.js

Issue 1013613002: Three dot menu is shown now on WebView start screen. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Button used instead of div for 'Add SU user'. Created 5 years, 9 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 /** 5 /**
6 * @fileoverview Login UI header bar implementation. 6 * @fileoverview Login UI header bar implementation.
7 */ 7 */
8 8
9 cr.define('login', function() { 9 cr.define('login', function() {
10 /** 10 /**
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 handleAddUserClick_: function(e) { 140 handleAddUserClick_: function(e) {
141 Oobe.showSigninUI(); 141 Oobe.showSigninUI();
142 // Prevent further propagation of click event. Otherwise, the click event 142 // Prevent further propagation of click event. Otherwise, the click event
143 // handler of document object will set wallpaper to user's wallpaper when 143 // handler of document object will set wallpaper to user's wallpaper when
144 // there is only one existing user. See http://crbug.com/166477 144 // there is only one existing user. See http://crbug.com/166477
145 e.stopPropagation(); 145 e.stopPropagation();
146 }, 146 },
147 147
148 handleMoreSettingsClick_: function(e) { 148 handleMoreSettingsClick_: function(e) {
149 this.isMoreSettingsActive = !this.isMoreSettingsActive; 149 this.isMoreSettingsActive = !this.isMoreSettingsActive;
150 this.addSupervisedUserMenu.focus();
150 e.stopPropagation(); 151 e.stopPropagation();
151 }, 152 },
152 153
153 handleClick_: function(e) { 154 handleClick_: function(e) {
154 this.isMoreSettingsActive = false; 155 this.isMoreSettingsActive = false;
155 }, 156 },
156 157
157 handleAddSupervisedUserClick_: function(e) { 158 handleAddSupervisedUserClick_: function(e) {
158 chrome.send('showSupervisedUserCreationScreen'); 159 chrome.send('showSupervisedUserCreationScreen');
159 e.preventDefault(); 160 e.preventDefault();
160 }, 161 },
162
161 /** 163 /**
162 * Cancel add user button click handler. 164 * Cancel add user button click handler.
163 * 165 *
164 * @private 166 * @private
165 */ 167 */
166 handleCancelAddUserClick_: function(e) { 168 handleCancelAddUserClick_: function(e) {
167 // Let screen handle cancel itself if that is capable of doing so. 169 // Let screen handle cancel itself if that is capable of doing so.
168 if (Oobe.getInstance().currentScreen && 170 if (Oobe.getInstance().currentScreen &&
169 Oobe.getInstance().currentScreen.cancel) { 171 Oobe.getInstance().currentScreen.cancel) {
170 Oobe.getInstance().currentScreen.cancel(); 172 Oobe.getInstance().currentScreen.cancel();
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 var isEnrollingConsumerManagement = (this.signinUIState_ == 324 var isEnrollingConsumerManagement = (this.signinUIState_ ==
323 SIGNIN_UI_STATE.CONSUMER_MANAGEMENT_ENROLLMENT); 325 SIGNIN_UI_STATE.CONSUMER_MANAGEMENT_ENROLLMENT);
324 var isMultiProfilesUI = 326 var isMultiProfilesUI =
325 (Oobe.getInstance().displayType == DISPLAY_TYPE.USER_ADDING); 327 (Oobe.getInstance().displayType == DISPLAY_TYPE.USER_ADDING);
326 var isLockScreen = 328 var isLockScreen =
327 (Oobe.getInstance().displayType == DISPLAY_TYPE.LOCK); 329 (Oobe.getInstance().displayType == DISPLAY_TYPE.LOCK);
328 330
329 $('add-user-button').hidden = 331 $('add-user-button').hidden =
330 !accountPickerIsActive || isMultiProfilesUI || isLockScreen; 332 !accountPickerIsActive || isMultiProfilesUI || isLockScreen;
331 $('more-settings-header-bar-item').hidden = !this.isMinuteMaid_ || 333 $('more-settings-header-bar-item').hidden = !this.isMinuteMaid_ ||
332 !gaiaIsActive || 334 !this.showCreateSupervised_ ||
333 !this.showCreateSupervised_; 335 !accountPickerIsActive;
334 $('cancel-add-user-button').hidden = 336 $('cancel-add-user-button').hidden =
335 (gaiaIsActive && this.isMinuteMaid_) || 337 (gaiaIsActive && this.isMinuteMaid_) ||
336 accountPickerIsActive || 338 accountPickerIsActive ||
337 !this.allowCancel_ || 339 !this.allowCancel_ ||
338 wrongHWIDWarningIsActive || 340 wrongHWIDWarningIsActive ||
339 isMultiProfilesUI; 341 isMultiProfilesUI;
340 $('guest-user-header-bar-item').hidden = 342 $('guest-user-header-bar-item').hidden =
341 (gaiaIsActive && !this.isMinuteMaid_) || 343 (gaiaIsActive && !this.isMinuteMaid_) ||
342 supervisedUserCreationDialogIsActive || 344 supervisedUserCreationDialogIsActive ||
343 !this.showGuest_ || 345 !this.showGuest_ ||
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 * Convenience wrapper of animateIn. 426 * Convenience wrapper of animateIn.
425 */ 427 */
426 HeaderBar.animateIn = function(fast, callback) { 428 HeaderBar.animateIn = function(fast, callback) {
427 $('login-header-bar').animateIn(fast, callback); 429 $('login-header-bar').animateIn(fast, callback);
428 }; 430 };
429 431
430 return { 432 return {
431 HeaderBar: HeaderBar 433 HeaderBar: HeaderBar
432 }; 434 };
433 }); 435 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/chromeos/login/header_bar.html ('k') | chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698