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

Side by Side Diff: ash/system/overview/overview_button_tray.cc

Issue 2041233005: Moves ash::user::LoginStatus to ash/common (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix test Created 4 years, 6 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/overview/overview_button_tray.h" 5 #include "ash/system/overview/overview_button_tray.h"
6 6
7 #include "ash/common/session/session_state_delegate.h" 7 #include "ash/common/session/session_state_delegate.h"
8 #include "ash/common/shelf/shelf_types.h" 8 #include "ash/common/shelf/shelf_types.h"
9 #include "ash/common/shelf/wm_shelf_util.h" 9 #include "ash/common/shelf/wm_shelf_util.h"
10 #include "ash/shelf/shelf_util.h" 10 #include "ash/shelf/shelf_util.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 Shell::GetInstance()->AddShellObserver(this); 47 Shell::GetInstance()->AddShellObserver(this);
48 Shell::GetInstance()->session_state_delegate()->AddSessionStateObserver(this); 48 Shell::GetInstance()->session_state_delegate()->AddSessionStateObserver(this);
49 } 49 }
50 50
51 OverviewButtonTray::~OverviewButtonTray() { 51 OverviewButtonTray::~OverviewButtonTray() {
52 Shell::GetInstance()->RemoveShellObserver(this); 52 Shell::GetInstance()->RemoveShellObserver(this);
53 Shell::GetInstance()->session_state_delegate()->RemoveSessionStateObserver( 53 Shell::GetInstance()->session_state_delegate()->RemoveSessionStateObserver(
54 this); 54 this);
55 } 55 }
56 56
57 void OverviewButtonTray::UpdateAfterLoginStatusChange( 57 void OverviewButtonTray::UpdateAfterLoginStatusChange(LoginStatus status) {
58 user::LoginStatus status) {
59 UpdateIconVisibility(); 58 UpdateIconVisibility();
60 } 59 }
61 60
62 bool OverviewButtonTray::PerformAction(const ui::Event& event) { 61 bool OverviewButtonTray::PerformAction(const ui::Event& event) {
63 WindowSelectorController* controller = 62 WindowSelectorController* controller =
64 Shell::GetInstance()->window_selector_controller(); 63 Shell::GetInstance()->window_selector_controller();
65 controller->ToggleOverview(); 64 controller->ToggleOverview();
66 SetDrawBackgroundAsActive(controller->IsSelecting()); 65 SetDrawBackgroundAsActive(controller->IsSelecting());
67 Shell::GetInstance()->metrics()->RecordUserMetricsAction(UMA_TRAY_OVERVIEW); 66 Shell::GetInstance()->metrics()->RecordUserMetricsAction(UMA_TRAY_OVERVIEW);
68 return true; 67 return true;
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 SessionStateDelegate* session_state_delegate = 128 SessionStateDelegate* session_state_delegate =
130 shell->session_state_delegate(); 129 shell->session_state_delegate();
131 130
132 SetVisible( 131 SetVisible(
133 shell->maximize_mode_controller()->IsMaximizeModeWindowManagerEnabled() && 132 shell->maximize_mode_controller()->IsMaximizeModeWindowManagerEnabled() &&
134 session_state_delegate->IsActiveUserSessionStarted() && 133 session_state_delegate->IsActiveUserSessionStarted() &&
135 !session_state_delegate->IsScreenLocked() && 134 !session_state_delegate->IsScreenLocked() &&
136 session_state_delegate->GetSessionState() == 135 session_state_delegate->GetSessionState() ==
137 SessionStateDelegate::SESSION_STATE_ACTIVE && 136 SessionStateDelegate::SESSION_STATE_ACTIVE &&
138 shell->system_tray_delegate()->GetUserLoginStatus() != 137 shell->system_tray_delegate()->GetUserLoginStatus() !=
139 user::LOGGED_IN_KIOSK_APP); 138 LoginStatus::KIOSK_APP);
140 } 139 }
141 140
142 } // namespace ash 141 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/overview/overview_button_tray.h ('k') | ash/system/overview/overview_button_tray_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698