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

Side by Side Diff: ash/aura/wm_shell_aura.cc

Issue 2106823004: Refactors maximize mode event handling into its own class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cleanup Created 4 years, 5 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/aura/wm_shell_aura.h" 5 #include "ash/aura/wm_shell_aura.h"
6 6
7 #include "ash/aura/wm_window_aura.h" 7 #include "ash/aura/wm_window_aura.h"
8 #include "ash/common/session/session_state_delegate.h" 8 #include "ash/common/session/session_state_delegate.h"
9 #include "ash/common/shell_observer.h" 9 #include "ash/common/shell_observer.h"
10 #include "ash/common/wm/mru_window_tracker.h" 10 #include "ash/common/wm/mru_window_tracker.h"
11 #include "ash/common/wm/overview/window_selector_controller.h" 11 #include "ash/common/wm/overview/window_selector_controller.h"
12 #include "ash/common/wm_activation_observer.h" 12 #include "ash/common/wm_activation_observer.h"
13 #include "ash/common/wm_display_observer.h" 13 #include "ash/common/wm_display_observer.h"
14 #include "ash/common/wm_shell_common.h" 14 #include "ash/common/wm_shell_common.h"
15 #include "ash/display/display_manager.h" 15 #include "ash/display/display_manager.h"
16 #include "ash/display/window_tree_host_manager.h" 16 #include "ash/display/window_tree_host_manager.h"
17 #include "ash/shell.h" 17 #include "ash/shell.h"
18 #include "ash/shell_delegate.h" 18 #include "ash/shell_delegate.h"
19 #include "ash/wm/drag_window_resizer.h" 19 #include "ash/wm/drag_window_resizer.h"
20 #include "ash/wm/maximize_mode/maximize_mode_event_handler_aura.h"
20 #include "ash/wm/screen_pinning_controller.h" 21 #include "ash/wm/screen_pinning_controller.h"
21 #include "ash/wm/window_util.h" 22 #include "ash/wm/window_util.h"
22 #include "base/memory/ptr_util.h" 23 #include "base/memory/ptr_util.h"
23 #include "ui/aura/client/focus_client.h" 24 #include "ui/aura/client/focus_client.h"
24 #include "ui/wm/public/activation_client.h" 25 #include "ui/wm/public/activation_client.h"
25 26
26 #if defined(OS_CHROMEOS) 27 #if defined(OS_CHROMEOS)
27 #include "ash/virtual_keyboard_controller.h" 28 #include "ash/virtual_keyboard_controller.h"
28 #endif 29 #endif
29 30
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 return Shell::GetInstance()->metrics()->RecordUserMetricsAction(action); 122 return Shell::GetInstance()->metrics()->RecordUserMetricsAction(action);
122 } 123 }
123 124
124 std::unique_ptr<WindowResizer> WmShellAura::CreateDragWindowResizer( 125 std::unique_ptr<WindowResizer> WmShellAura::CreateDragWindowResizer(
125 std::unique_ptr<WindowResizer> next_window_resizer, 126 std::unique_ptr<WindowResizer> next_window_resizer,
126 wm::WindowState* window_state) { 127 wm::WindowState* window_state) {
127 return base::WrapUnique( 128 return base::WrapUnique(
128 DragWindowResizer::Create(next_window_resizer.release(), window_state)); 129 DragWindowResizer::Create(next_window_resizer.release(), window_state));
129 } 130 }
130 131
132 std::unique_ptr<wm::MaximizeModeEventHandler>
133 WmShellAura::CreateMaximizeModeEventHandler() {
134 return base::WrapUnique(new wm::MaximizeModeEventHandlerAura);
135 }
136
131 void WmShellAura::OnOverviewModeStarting() { 137 void WmShellAura::OnOverviewModeStarting() {
132 FOR_EACH_OBSERVER(ShellObserver, *wm_shell_common_->shell_observers(), 138 FOR_EACH_OBSERVER(ShellObserver, *wm_shell_common_->shell_observers(),
133 OnOverviewModeStarting()); 139 OnOverviewModeStarting());
134 } 140 }
135 141
136 void WmShellAura::OnOverviewModeEnded() { 142 void WmShellAura::OnOverviewModeEnded() {
137 FOR_EACH_OBSERVER(ShellObserver, *wm_shell_common_->shell_observers(), 143 FOR_EACH_OBSERVER(ShellObserver, *wm_shell_common_->shell_observers(),
138 OnOverviewModeEnded()); 144 OnOverviewModeEnded());
139 } 145 }
140 146
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 FOR_EACH_OBSERVER(WmDisplayObserver, display_observers_, 221 FOR_EACH_OBSERVER(WmDisplayObserver, display_observers_,
216 OnDisplayConfigurationChanging()); 222 OnDisplayConfigurationChanging());
217 } 223 }
218 224
219 void WmShellAura::OnDisplayConfigurationChanged() { 225 void WmShellAura::OnDisplayConfigurationChanged() {
220 FOR_EACH_OBSERVER(WmDisplayObserver, display_observers_, 226 FOR_EACH_OBSERVER(WmDisplayObserver, display_observers_,
221 OnDisplayConfigurationChanged()); 227 OnDisplayConfigurationChanged());
222 } 228 }
223 229
224 } // namespace ash 230 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698