| 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/key_event_watcher.h" | 10 #include "ash/common/key_event_watcher.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 #include "ash/mus/root_window_controller.h" | 30 #include "ash/mus/root_window_controller.h" |
| 31 #include "ash/mus/window_manager.h" | 31 #include "ash/mus/window_manager.h" |
| 32 #include "ash/public/cpp/shell_window_ids.h" | 32 #include "ash/public/cpp/shell_window_ids.h" |
| 33 #include "ash/shared/immersive_fullscreen_controller.h" | 33 #include "ash/shared/immersive_fullscreen_controller.h" |
| 34 #include "base/memory/ptr_util.h" | 34 #include "base/memory/ptr_util.h" |
| 35 #include "components/user_manager/user_info_impl.h" | 35 #include "components/user_manager/user_info_impl.h" |
| 36 #include "ui/aura/mus/window_tree_client.h" | 36 #include "ui/aura/mus/window_tree_client.h" |
| 37 #include "ui/aura/window.h" | 37 #include "ui/aura/window.h" |
| 38 #include "ui/display/manager/managed_display_info.h" | 38 #include "ui/display/manager/managed_display_info.h" |
| 39 #include "ui/display/screen.h" | 39 #include "ui/display/screen.h" |
| 40 #include "ui/views/mus/pointer_watcher_event_router2.h" | 40 #include "ui/views/mus/pointer_watcher_event_router.h" |
| 41 #include "ui/wm/core/capture_controller.h" | 41 #include "ui/wm/core/capture_controller.h" |
| 42 #include "ui/wm/core/focus_controller.h" | 42 #include "ui/wm/core/focus_controller.h" |
| 43 | 43 |
| 44 namespace ash { | 44 namespace ash { |
| 45 namespace mus { | 45 namespace mus { |
| 46 | 46 |
| 47 namespace { | 47 namespace { |
| 48 | 48 |
| 49 // TODO(jamescook): After ShellDelegate is ported to ash/common use | 49 // TODO(jamescook): After ShellDelegate is ported to ash/common use |
| 50 // ShellDelegate::CreateSessionStateDelegate() to construct the mus version | 50 // ShellDelegate::CreateSessionStateDelegate() to construct the mus version |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 std::unique_ptr<user_manager::UserInfo> user_info_; | 105 std::unique_ptr<user_manager::UserInfo> user_info_; |
| 106 | 106 |
| 107 DISALLOW_COPY_AND_ASSIGN(SessionStateDelegateStub); | 107 DISALLOW_COPY_AND_ASSIGN(SessionStateDelegateStub); |
| 108 }; | 108 }; |
| 109 | 109 |
| 110 } // namespace | 110 } // namespace |
| 111 | 111 |
| 112 WmShellMus::WmShellMus( | 112 WmShellMus::WmShellMus( |
| 113 std::unique_ptr<ShellDelegate> shell_delegate, | 113 std::unique_ptr<ShellDelegate> shell_delegate, |
| 114 WindowManager* window_manager, | 114 WindowManager* window_manager, |
| 115 views::PointerWatcherEventRouter2* pointer_watcher_event_router) | 115 views::PointerWatcherEventRouter* pointer_watcher_event_router) |
| 116 : WmShell(std::move(shell_delegate)), | 116 : WmShell(std::move(shell_delegate)), |
| 117 window_manager_(window_manager), | 117 window_manager_(window_manager), |
| 118 pointer_watcher_event_router_(pointer_watcher_event_router), | 118 pointer_watcher_event_router_(pointer_watcher_event_router), |
| 119 session_state_delegate_(new SessionStateDelegateStub) { | 119 session_state_delegate_(new SessionStateDelegateStub) { |
| 120 WmShell::Set(this); | 120 WmShell::Set(this); |
| 121 | 121 |
| 122 uint16_t accelerator_namespace_id = 0u; | 122 uint16_t accelerator_namespace_id = 0u; |
| 123 const bool add_result = | 123 const bool add_result = |
| 124 window_manager->GetNextAcceleratorNamespaceId(&accelerator_namespace_id); | 124 window_manager->GetNextAcceleratorNamespaceId(&accelerator_namespace_id); |
| 125 // WmShellMus is created early on, so that this should always succeed. | 125 // WmShellMus is created early on, so that this should always succeed. |
| (...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 458 WmWindow* gained_active_wm = WmWindowMus::Get(gained_active); | 458 WmWindow* gained_active_wm = WmWindowMus::Get(gained_active); |
| 459 if (gained_active_wm) | 459 if (gained_active_wm) |
| 460 set_root_window_for_new_windows(gained_active_wm->GetRootWindow()); | 460 set_root_window_for_new_windows(gained_active_wm->GetRootWindow()); |
| 461 WmWindow* lost_active_wm = WmWindowMus::Get(lost_active); | 461 WmWindow* lost_active_wm = WmWindowMus::Get(lost_active); |
| 462 for (auto& observer : activation_observers_) | 462 for (auto& observer : activation_observers_) |
| 463 observer.OnWindowActivated(gained_active_wm, lost_active_wm); | 463 observer.OnWindowActivated(gained_active_wm, lost_active_wm); |
| 464 } | 464 } |
| 465 | 465 |
| 466 } // namespace mus | 466 } // namespace mus |
| 467 } // namespace ash | 467 } // namespace ash |
| OLD | NEW |