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

Side by Side Diff: ash/mus/bridge/wm_shell_mus.cc

Issue 2271373002: mash: Port mojo:ash_sysui's ContextMenuMus to mojo:ash. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move factory ownership to WindowManagerApplication; to match AuraInit/ViewsDelegate. Created 4 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 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 <utility> 7 #include <utility>
8 8
9 #include "ash/common/accelerators/accelerator_controller.h" 9 #include "ash/common/accelerators/accelerator_controller.h"
10 #include "ash/common/display/display_info.h" 10 #include "ash/common/display/display_info.h"
11 #include "ash/common/keyboard/keyboard_ui.h" 11 #include "ash/common/keyboard/keyboard_ui.h"
12 #include "ash/common/session/session_state_delegate.h" 12 #include "ash/common/session/session_state_delegate.h"
13 #include "ash/common/shell_delegate.h" 13 #include "ash/common/shell_delegate.h"
14 #include "ash/common/shell_observer.h" 14 #include "ash/common/shell_observer.h"
15 #include "ash/common/shell_window_ids.h" 15 #include "ash/common/shell_window_ids.h"
16 #include "ash/common/system/tray/default_system_tray_delegate.h" 16 #include "ash/common/system/tray/default_system_tray_delegate.h"
17 #include "ash/common/wallpaper/wallpaper_delegate.h"
17 #include "ash/common/wm/maximize_mode/maximize_mode_event_handler.h" 18 #include "ash/common/wm/maximize_mode/maximize_mode_event_handler.h"
18 #include "ash/common/wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard .h" 19 #include "ash/common/wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard .h"
19 #include "ash/common/wm/mru_window_tracker.h" 20 #include "ash/common/wm/mru_window_tracker.h"
20 #include "ash/common/wm/window_cycle_event_filter.h" 21 #include "ash/common/wm/window_cycle_event_filter.h"
21 #include "ash/common/wm/window_resizer.h" 22 #include "ash/common/wm/window_resizer.h"
22 #include "ash/common/wm_activation_observer.h" 23 #include "ash/common/wm_activation_observer.h"
23 #include "ash/mus/accelerators/accelerator_controller_delegate_mus.h" 24 #include "ash/mus/accelerators/accelerator_controller_delegate_mus.h"
24 #include "ash/mus/accelerators/accelerator_controller_registrar.h" 25 #include "ash/mus/accelerators/accelerator_controller_registrar.h"
25 #include "ash/mus/bridge/wm_root_window_controller_mus.h" 26 #include "ash/mus/bridge/wm_root_window_controller_mus.h"
26 #include "ash/mus/bridge/wm_window_mus.h" 27 #include "ash/mus/bridge/wm_window_mus.h"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 accelerator_controller_registrar_.get())); 128 accelerator_controller_registrar_.get()));
128 129
129 CreateMaximizeModeController(); 130 CreateMaximizeModeController();
130 131
131 CreateMruWindowTracker(); 132 CreateMruWindowTracker();
132 133
133 SetSystemTrayDelegate(base::WrapUnique(new DefaultSystemTrayDelegate)); 134 SetSystemTrayDelegate(base::WrapUnique(new DefaultSystemTrayDelegate));
134 135
135 // TODO(jamescook): Port ash::sysui::KeyboardUIMus and use it here. 136 // TODO(jamescook): Port ash::sysui::KeyboardUIMus and use it here.
136 SetKeyboardUI(KeyboardUI::Create()); 137 SetKeyboardUI(KeyboardUI::Create());
138
139 // TODO(msw): Port WallpaperDelegateMus and support this (crbug.com/629605):
140 // wallpaper_delegate()->InitializeWallpaper();
137 } 141 }
138 142
139 WmShellMus::~WmShellMus() { 143 WmShellMus::~WmShellMus() {
140 // This order mirrors that of Shell. 144 // This order mirrors that of Shell.
141 145
142 // Destroy maximize mode controller early on since it has some observers which 146 // Destroy maximize mode controller early on since it has some observers which
143 // need to be removed. 147 // need to be removed.
144 DeleteMaximizeModeController(); 148 DeleteMaximizeModeController();
145 DeleteToastManager(); 149 DeleteToastManager();
146 DeleteSystemTrayDelegate(); 150 DeleteSystemTrayDelegate();
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 NOTIMPLEMENTED(); 304 NOTIMPLEMENTED();
301 } 305 }
302 306
303 void WmShellMus::RecordTaskSwitchMetric(TaskSwitchSource source) { 307 void WmShellMus::RecordTaskSwitchMetric(TaskSwitchSource source) {
304 // TODO: http://crbug.com/616581. 308 // TODO: http://crbug.com/616581.
305 NOTIMPLEMENTED(); 309 NOTIMPLEMENTED();
306 } 310 }
307 311
308 void WmShellMus::ShowContextMenu(const gfx::Point& location_in_screen, 312 void WmShellMus::ShowContextMenu(const gfx::Point& location_in_screen,
309 ui::MenuSourceType source_type) { 313 ui::MenuSourceType source_type) {
314 // TODO: http://crbug.com/640693.
310 NOTIMPLEMENTED(); 315 NOTIMPLEMENTED();
311 } 316 }
312 317
313 std::unique_ptr<WindowResizer> WmShellMus::CreateDragWindowResizer( 318 std::unique_ptr<WindowResizer> WmShellMus::CreateDragWindowResizer(
314 std::unique_ptr<WindowResizer> next_window_resizer, 319 std::unique_ptr<WindowResizer> next_window_resizer,
315 wm::WindowState* window_state) { 320 wm::WindowState* window_state) {
316 return base::MakeUnique<DragWindowResizer>(std::move(next_window_resizer), 321 return base::MakeUnique<DragWindowResizer>(std::move(next_window_resizer),
317 window_state); 322 window_state);
318 } 323 }
319 324
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 OnWindowActivated(gained_active, lost_active)); 424 OnWindowActivated(gained_active, lost_active));
420 } 425 }
421 426
422 void WmShellMus::OnDidDestroyClient(ui::WindowTreeClient* client) { 427 void WmShellMus::OnDidDestroyClient(ui::WindowTreeClient* client) {
423 DCHECK_EQ(window_tree_client(), client); 428 DCHECK_EQ(window_tree_client(), client);
424 client->RemoveObserver(this); 429 client->RemoveObserver(this);
425 } 430 }
426 431
427 } // namespace mus 432 } // namespace mus
428 } // namespace ash 433 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698