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

Side by Side Diff: ash/system/date/date_default_view.cc

Issue 357323002: Tray elements behave appropriately on the multiple signin screen (more like lock screen) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Stored result of check on multiple signin screen to local variable Created 6 years, 4 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "ash/system/date/date_default_view.h" 5 #include "ash/system/date/date_default_view.h"
6 6
7 #include "ash/metrics/user_metrics_recorder.h" 7 #include "ash/metrics/user_metrics_recorder.h"
8 #include "ash/session/session_state_delegate.h" 8 #include "ash/session/session_state_delegate.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/system/date/date_view.h" 10 #include "ash/system/date/date_view.h"
(...skipping 24 matching lines...) Expand all
35 date_view_(NULL) { 35 date_view_(NULL) {
36 SetLayoutManager(new views::FillLayout); 36 SetLayoutManager(new views::FillLayout);
37 37
38 date_view_ = new tray::DateView(); 38 date_view_ = new tray::DateView();
39 date_view_->SetBorder(views::Border::CreateEmptyBorder( 39 date_view_->SetBorder(views::Border::CreateEmptyBorder(
40 kPaddingVertical, ash::kTrayPopupPaddingHorizontal, 0, 0)); 40 kPaddingVertical, ash::kTrayPopupPaddingHorizontal, 0, 0));
41 SpecialPopupRow* view = new SpecialPopupRow(); 41 SpecialPopupRow* view = new SpecialPopupRow();
42 view->SetContent(date_view_); 42 view->SetContent(date_view_);
43 AddChildView(view); 43 AddChildView(view);
44 44
45 if (login == ash::user::LOGGED_IN_LOCKED || 45 bool userAddingRunning =
46 login == ash::user::LOGGED_IN_NONE) 46 (ash::Shell::GetInstance()->session_state_delegate()->GetSessionState() ==
47 ash::SessionStateDelegate::SESSION_STATE_LOGIN_SECONDARY);
48
49 if (login == user::LOGGED_IN_LOCKED ||
50 login == user::LOGGED_IN_NONE || userAddingRunning)
47 return; 51 return;
48 52
49 date_view_->SetAction(TrayDate::SHOW_DATE_SETTINGS); 53 date_view_->SetAction(TrayDate::SHOW_DATE_SETTINGS);
50 54
51 help_ = new TrayPopupHeaderButton(this, 55 help_ = new TrayPopupHeaderButton(this,
52 IDR_AURA_UBER_TRAY_HELP, 56 IDR_AURA_UBER_TRAY_HELP,
53 IDR_AURA_UBER_TRAY_HELP, 57 IDR_AURA_UBER_TRAY_HELP,
54 IDR_AURA_UBER_TRAY_HELP_HOVER, 58 IDR_AURA_UBER_TRAY_HELP_HOVER,
55 IDR_AURA_UBER_TRAY_HELP_HOVER, 59 IDR_AURA_UBER_TRAY_HELP_HOVER,
56 IDS_ASH_STATUS_TRAY_HELP); 60 IDS_ASH_STATUS_TRAY_HELP);
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 tray_delegate->ShutDown(); 115 tray_delegate->ShutDown();
112 } else if (sender == lock_) { 116 } else if (sender == lock_) {
113 shell->metrics()->RecordUserMetricsAction(ash::UMA_TRAY_LOCK_SCREEN); 117 shell->metrics()->RecordUserMetricsAction(ash::UMA_TRAY_LOCK_SCREEN);
114 tray_delegate->RequestLockScreen(); 118 tray_delegate->RequestLockScreen();
115 } else { 119 } else {
116 NOTREACHED(); 120 NOTREACHED();
117 } 121 }
118 } 122 }
119 123
120 } // namespace ash 124 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698