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

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

Issue 515573002: Use active state on touch start for tray icons (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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/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
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());
Mr4D (OOO till 08-26) 2014/09/04 19:58:35 Shouldn't this command also be dependent on the co
jonross 2014/09/05 16:31:49 This I added because currently the overview button
Mr4D (OOO till 08-26) 2014/09/05 16:38:57 I think that should be fine.
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698