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

Side by Side Diff: ash/mus/bridge/wm_shell_mus.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/mus/bridge/wm_shell_mus.h" 5 #include "ash/mus/bridge/wm_shell_mus.h"
6 6
7 #include "ash/common/default_accessibility_delegate.h" 7 #include "ash/common/default_accessibility_delegate.h"
8 #include "ash/common/display/display_info.h" 8 #include "ash/common/display/display_info.h"
9 #include "ash/common/session/session_state_delegate.h" 9 #include "ash/common/session/session_state_delegate.h"
10 #include "ash/common/shell_observer.h" 10 #include "ash/common/shell_observer.h"
11 #include "ash/common/shell_window_ids.h" 11 #include "ash/common/shell_window_ids.h"
12 #include "ash/common/system/tray/default_system_tray_delegate.h" 12 #include "ash/common/system/tray/default_system_tray_delegate.h"
13 #include "ash/common/wm/maximize_mode/maximize_mode_event_handler.h"
13 #include "ash/common/wm/mru_window_tracker.h" 14 #include "ash/common/wm/mru_window_tracker.h"
14 #include "ash/common/wm/window_resizer.h" 15 #include "ash/common/wm/window_resizer.h"
15 #include "ash/common/wm_activation_observer.h" 16 #include "ash/common/wm_activation_observer.h"
16 #include "ash/common/wm_shell_common.h" 17 #include "ash/common/wm_shell_common.h"
17 #include "ash/mus/bridge/wm_root_window_controller_mus.h" 18 #include "ash/mus/bridge/wm_root_window_controller_mus.h"
18 #include "ash/mus/bridge/wm_window_mus.h" 19 #include "ash/mus/bridge/wm_window_mus.h"
19 #include "ash/mus/container_ids.h" 20 #include "ash/mus/container_ids.h"
20 #include "ash/mus/drag_window_resizer.h" 21 #include "ash/mus/drag_window_resizer.h"
21 #include "ash/mus/root_window_controller.h" 22 #include "ash/mus/root_window_controller.h"
22 #include "base/memory/ptr_util.h" 23 #include "base/memory/ptr_util.h"
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 NOTIMPLEMENTED(); 224 NOTIMPLEMENTED();
224 } 225 }
225 226
226 std::unique_ptr<WindowResizer> WmShellMus::CreateDragWindowResizer( 227 std::unique_ptr<WindowResizer> WmShellMus::CreateDragWindowResizer(
227 std::unique_ptr<WindowResizer> next_window_resizer, 228 std::unique_ptr<WindowResizer> next_window_resizer,
228 wm::WindowState* window_state) { 229 wm::WindowState* window_state) {
229 return base::WrapUnique( 230 return base::WrapUnique(
230 new DragWindowResizer(std::move(next_window_resizer), window_state)); 231 new DragWindowResizer(std::move(next_window_resizer), window_state));
231 } 232 }
232 233
234 std::unique_ptr<wm::MaximizeModeEventHandler>
235 WmShellMus::CreateMaximizeModeEventHandler() {
236 // TODO: need support for window manager to get events before client:
237 // http://crbug.com/624157.
238 NOTIMPLEMENTED();
239 return nullptr;
240 }
241
233 void WmShellMus::OnOverviewModeStarting() { 242 void WmShellMus::OnOverviewModeStarting() {
234 FOR_EACH_OBSERVER(ShellObserver, *wm_shell_common_->shell_observers(), 243 FOR_EACH_OBSERVER(ShellObserver, *wm_shell_common_->shell_observers(),
235 OnOverviewModeStarting()); 244 OnOverviewModeStarting());
236 } 245 }
237 246
238 void WmShellMus::OnOverviewModeEnded() { 247 void WmShellMus::OnOverviewModeEnded() {
239 FOR_EACH_OBSERVER(ShellObserver, *wm_shell_common_->shell_observers(), 248 FOR_EACH_OBSERVER(ShellObserver, *wm_shell_common_->shell_observers(),
240 OnOverviewModeEnded()); 249 OnOverviewModeEnded());
241 } 250 }
242 251
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 OnWindowActivated(gained_active, lost_active)); 322 OnWindowActivated(gained_active, lost_active));
314 } 323 }
315 324
316 void WmShellMus::OnWillDestroyClient(::mus::WindowTreeClient* client) { 325 void WmShellMus::OnWillDestroyClient(::mus::WindowTreeClient* client) {
317 DCHECK_EQ(client, client_); 326 DCHECK_EQ(client, client_);
318 RemoveClientObserver(); 327 RemoveClientObserver();
319 } 328 }
320 329
321 } // namespace mus 330 } // namespace mus
322 } // namespace ash 331 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698