| OLD | NEW |
| 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/shelf/shelf_types.h" | 7 #include "ash/shelf/shelf_types.h" |
| 8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
| 9 #include "ash/system/tray/system_tray_delegate.h" | 9 #include "ash/system/tray/system_tray_delegate.h" |
| 10 #include "ash/system/tray/tray_utils.h" | 10 #include "ash/system/tray/tray_utils.h" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 OverviewButtonTray::~OverviewButtonTray() { | 47 OverviewButtonTray::~OverviewButtonTray() { |
| 48 Shell::GetInstance()->RemoveShellObserver(this); | 48 Shell::GetInstance()->RemoveShellObserver(this); |
| 49 } | 49 } |
| 50 | 50 |
| 51 void OverviewButtonTray::UpdateAfterLoginStatusChange( | 51 void OverviewButtonTray::UpdateAfterLoginStatusChange( |
| 52 user::LoginStatus status) { | 52 user::LoginStatus status) { |
| 53 UpdateIconVisibility(); | 53 UpdateIconVisibility(); |
| 54 } | 54 } |
| 55 | 55 |
| 56 bool OverviewButtonTray::PerformAction(const ui::Event& event) { | 56 bool OverviewButtonTray::PerformAction(const ui::Event& event) { |
| 57 Shell::GetInstance()->window_selector_controller()->ToggleOverview(); | 57 WindowSelectorController* controller = |
| 58 Shell::GetInstance()->window_selector_controller(); |
| 59 controller->ToggleOverview(); |
| 60 SetDrawBackgroundAsActive(controller->IsSelecting()); |
| 58 return true; | 61 return true; |
| 59 } | 62 } |
| 60 | 63 |
| 61 void OverviewButtonTray::OnMaximizeModeStarted() { | 64 void OverviewButtonTray::OnMaximizeModeStarted() { |
| 62 UpdateIconVisibility(); | 65 UpdateIconVisibility(); |
| 63 } | 66 } |
| 64 | 67 |
| 65 void OverviewButtonTray::OnMaximizeModeEnded() { | 68 void OverviewButtonTray::OnMaximizeModeEnded() { |
| 66 UpdateIconVisibility(); | 69 UpdateIconVisibility(); |
| 67 } | 70 } |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 } | 109 } |
| 107 } | 110 } |
| 108 | 111 |
| 109 void OverviewButtonTray::UpdateIconVisibility() { | 112 void OverviewButtonTray::UpdateIconVisibility() { |
| 110 SetVisible(Shell::GetInstance()->maximize_mode_controller()-> | 113 SetVisible(Shell::GetInstance()->maximize_mode_controller()-> |
| 111 IsMaximizeModeWindowManagerEnabled() && | 114 IsMaximizeModeWindowManagerEnabled() && |
| 112 Shell::GetInstance()->window_selector_controller()->CanSelect()); | 115 Shell::GetInstance()->window_selector_controller()->CanSelect()); |
| 113 } | 116 } |
| 114 | 117 |
| 115 } // namespace ash | 118 } // namespace ash |
| OLD | NEW |