| OLD | NEW |
| 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" | |
| 11 #include "ash/common/keyboard/keyboard_ui.h" | 10 #include "ash/common/keyboard/keyboard_ui.h" |
| 12 #include "ash/common/session/session_state_delegate.h" | 11 #include "ash/common/session/session_state_delegate.h" |
| 13 #include "ash/common/shell_delegate.h" | 12 #include "ash/common/shell_delegate.h" |
| 14 #include "ash/common/shell_observer.h" | 13 #include "ash/common/shell_observer.h" |
| 15 #include "ash/common/shell_window_ids.h" | 14 #include "ash/common/shell_window_ids.h" |
| 16 #include "ash/common/system/tray/default_system_tray_delegate.h" | 15 #include "ash/common/system/tray/default_system_tray_delegate.h" |
| 17 #include "ash/common/wallpaper/wallpaper_delegate.h" | 16 #include "ash/common/wallpaper/wallpaper_delegate.h" |
| 18 #include "ash/common/wm/maximize_mode/maximize_mode_event_handler.h" | 17 #include "ash/common/wm/maximize_mode/maximize_mode_event_handler.h" |
| 19 #include "ash/common/wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard
.h" | 18 #include "ash/common/wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard
.h" |
| 20 #include "ash/common/wm/mru_window_tracker.h" | 19 #include "ash/common/wm/mru_window_tracker.h" |
| 21 #include "ash/common/wm/window_cycle_event_filter.h" | 20 #include "ash/common/wm/window_cycle_event_filter.h" |
| 22 #include "ash/common/wm/window_resizer.h" | 21 #include "ash/common/wm/window_resizer.h" |
| 23 #include "ash/common/wm_activation_observer.h" | 22 #include "ash/common/wm_activation_observer.h" |
| 24 #include "ash/mus/accelerators/accelerator_controller_delegate_mus.h" | 23 #include "ash/mus/accelerators/accelerator_controller_delegate_mus.h" |
| 25 #include "ash/mus/accelerators/accelerator_controller_registrar.h" | 24 #include "ash/mus/accelerators/accelerator_controller_registrar.h" |
| 26 #include "ash/mus/bridge/immersive_handler_factory_mus.h" | 25 #include "ash/mus/bridge/immersive_handler_factory_mus.h" |
| 27 #include "ash/mus/bridge/wm_root_window_controller_mus.h" | 26 #include "ash/mus/bridge/wm_root_window_controller_mus.h" |
| 28 #include "ash/mus/bridge/wm_window_mus.h" | 27 #include "ash/mus/bridge/wm_window_mus.h" |
| 29 #include "ash/mus/bridge/workspace_event_handler_mus.h" | 28 #include "ash/mus/bridge/workspace_event_handler_mus.h" |
| 30 #include "ash/mus/container_ids.h" | 29 #include "ash/mus/container_ids.h" |
| 31 #include "ash/mus/drag_window_resizer.h" | 30 #include "ash/mus/drag_window_resizer.h" |
| 32 #include "ash/mus/root_window_controller.h" | 31 #include "ash/mus/root_window_controller.h" |
| 33 #include "ash/mus/window_manager.h" | 32 #include "ash/mus/window_manager.h" |
| 34 #include "ash/shared/immersive_fullscreen_controller.h" | 33 #include "ash/shared/immersive_fullscreen_controller.h" |
| 35 #include "base/memory/ptr_util.h" | 34 #include "base/memory/ptr_util.h" |
| 36 #include "components/user_manager/user_info_impl.h" | 35 #include "components/user_manager/user_info_impl.h" |
| 37 #include "services/ui/common/util.h" | 36 #include "services/ui/common/util.h" |
| 38 #include "services/ui/public/cpp/window.h" | 37 #include "services/ui/public/cpp/window.h" |
| 39 #include "services/ui/public/cpp/window_tree_client.h" | 38 #include "services/ui/public/cpp/window_tree_client.h" |
| 39 #include "ui/display/manager/managed_display_info.h" |
| 40 #include "ui/display/screen.h" | 40 #include "ui/display/screen.h" |
| 41 #include "ui/views/mus/pointer_watcher_event_router.h" | 41 #include "ui/views/mus/pointer_watcher_event_router.h" |
| 42 | 42 |
| 43 namespace ash { | 43 namespace ash { |
| 44 namespace mus { | 44 namespace mus { |
| 45 | 45 |
| 46 namespace { | 46 namespace { |
| 47 | 47 |
| 48 // TODO(jamescook): After ShellDelegate is ported to ash/common use | 48 // TODO(jamescook): After ShellDelegate is ported to ash/common use |
| 49 // ShellDelegate::CreateSessionStateDelegate() to construct the mus version | 49 // ShellDelegate::CreateSessionStateDelegate() to construct the mus version |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 } | 219 } |
| 220 | 220 |
| 221 WmWindow* WmShellMus::GetPrimaryRootWindow() { | 221 WmWindow* WmShellMus::GetPrimaryRootWindow() { |
| 222 return root_window_controllers_[0]->GetWindow(); | 222 return root_window_controllers_[0]->GetWindow(); |
| 223 } | 223 } |
| 224 | 224 |
| 225 WmWindow* WmShellMus::GetRootWindowForDisplayId(int64_t display_id) { | 225 WmWindow* WmShellMus::GetRootWindowForDisplayId(int64_t display_id) { |
| 226 return GetRootWindowControllerWithDisplayId(display_id)->GetWindow(); | 226 return GetRootWindowControllerWithDisplayId(display_id)->GetWindow(); |
| 227 } | 227 } |
| 228 | 228 |
| 229 const DisplayInfo& WmShellMus::GetDisplayInfo(int64_t display_id) const { | 229 const display::ManagedDisplayInfo& WmShellMus::GetDisplayInfo( |
| 230 int64_t display_id) const { |
| 230 // TODO(mash): implement http://crbug.com/622480. | 231 // TODO(mash): implement http://crbug.com/622480. |
| 231 NOTIMPLEMENTED(); | 232 NOTIMPLEMENTED(); |
| 232 static DisplayInfo fake_info; | 233 static display::ManagedDisplayInfo fake_info; |
| 233 return fake_info; | 234 return fake_info; |
| 234 } | 235 } |
| 235 | 236 |
| 236 bool WmShellMus::IsActiveDisplayId(int64_t display_id) const { | 237 bool WmShellMus::IsActiveDisplayId(int64_t display_id) const { |
| 237 // TODO(mash): implement http://crbug.com/622480. | 238 // TODO(mash): implement http://crbug.com/622480. |
| 238 NOTIMPLEMENTED(); | 239 NOTIMPLEMENTED(); |
| 239 return true; | 240 return true; |
| 240 } | 241 } |
| 241 | 242 |
| 242 display::Display WmShellMus::GetFirstDisplay() const { | 243 display::Display WmShellMus::GetFirstDisplay() const { |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 432 OnWindowActivated(gained_active, lost_active)); | 433 OnWindowActivated(gained_active, lost_active)); |
| 433 } | 434 } |
| 434 | 435 |
| 435 void WmShellMus::OnDidDestroyClient(ui::WindowTreeClient* client) { | 436 void WmShellMus::OnDidDestroyClient(ui::WindowTreeClient* client) { |
| 436 DCHECK_EQ(window_tree_client(), client); | 437 DCHECK_EQ(window_tree_client(), client); |
| 437 client->RemoveObserver(this); | 438 client->RemoveObserver(this); |
| 438 } | 439 } |
| 439 | 440 |
| 440 } // namespace mus | 441 } // namespace mus |
| 441 } // namespace ash | 442 } // namespace ash |
| OLD | NEW |