| 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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 views::PointerWatcherEventRouter* pointer_watcher_event_router, | 119 views::PointerWatcherEventRouter* pointer_watcher_event_router, |
| 120 bool create_session_state_delegate_stub) | 120 bool create_session_state_delegate_stub) |
| 121 : window_manager_(window_manager), | 121 : window_manager_(window_manager), |
| 122 primary_root_window_(primary_root_window), | 122 primary_root_window_(primary_root_window), |
| 123 pointer_watcher_event_router_(pointer_watcher_event_router) { | 123 pointer_watcher_event_router_(pointer_watcher_event_router) { |
| 124 if (create_session_state_delegate_stub) | 124 if (create_session_state_delegate_stub) |
| 125 session_state_delegate_ = base::MakeUnique<SessionStateDelegateStub>(); | 125 session_state_delegate_ = base::MakeUnique<SessionStateDelegateStub>(); |
| 126 DCHECK(primary_root_window_); | 126 DCHECK(primary_root_window_); |
| 127 | 127 |
| 128 immersive_handler_factory_.reset(new ImmersiveHandlerFactoryMus); | 128 immersive_handler_factory_.reset(new ImmersiveHandlerFactoryMus); |
| 129 | |
| 130 SetKeyboardUI(KeyboardUIMus::Create(window_manager_->connector())); | |
| 131 } | 129 } |
| 132 | 130 |
| 133 WmShellMus::~WmShellMus() { | 131 WmShellMus::~WmShellMus() { |
| 134 } | 132 } |
| 135 | 133 |
| 136 // static | 134 // static |
| 137 WmShellMus* WmShellMus::Get() { | 135 WmShellMus* WmShellMus::Get() { |
| 138 return static_cast<WmShellMus*>(WmShell::Get()); | 136 return static_cast<WmShellMus*>(WmShell::Get()); |
| 139 } | 137 } |
| 140 | 138 |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 316 WmWindow* workspace_window) { | 314 WmWindow* workspace_window) { |
| 317 return base::MakeUnique<WorkspaceEventHandlerMus>( | 315 return base::MakeUnique<WorkspaceEventHandlerMus>( |
| 318 WmWindow::GetAuraWindow(workspace_window)); | 316 WmWindow::GetAuraWindow(workspace_window)); |
| 319 } | 317 } |
| 320 | 318 |
| 321 std::unique_ptr<ImmersiveFullscreenController> | 319 std::unique_ptr<ImmersiveFullscreenController> |
| 322 WmShellMus::CreateImmersiveFullscreenController() { | 320 WmShellMus::CreateImmersiveFullscreenController() { |
| 323 return base::MakeUnique<ImmersiveFullscreenController>(); | 321 return base::MakeUnique<ImmersiveFullscreenController>(); |
| 324 } | 322 } |
| 325 | 323 |
| 324 std::unique_ptr<KeyboardUI> WmShellMus::CreateKeyboardUI() { |
| 325 return KeyboardUIMus::Create(window_manager_->connector()); |
| 326 } |
| 327 |
| 326 std::unique_ptr<KeyEventWatcher> WmShellMus::CreateKeyEventWatcher() { | 328 std::unique_ptr<KeyEventWatcher> WmShellMus::CreateKeyEventWatcher() { |
| 327 // TODO: needs implementation for mus, http://crbug.com/649600. | 329 // TODO: needs implementation for mus, http://crbug.com/649600. |
| 328 NOTIMPLEMENTED(); | 330 NOTIMPLEMENTED(); |
| 329 return std::unique_ptr<KeyEventWatcher>(); | 331 return std::unique_ptr<KeyEventWatcher>(); |
| 330 } | 332 } |
| 331 | 333 |
| 332 SessionStateDelegate* WmShellMus::GetSessionStateDelegate() { | 334 SessionStateDelegate* WmShellMus::GetSessionStateDelegate() { |
| 333 return session_state_delegate_ | 335 return session_state_delegate_ |
| 334 ? session_state_delegate_.get() | 336 ? session_state_delegate_.get() |
| 335 : Shell::GetInstance()->session_state_delegate(); | 337 : Shell::GetInstance()->session_state_delegate(); |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 399 accelerator_controller_registrar_ = | 401 accelerator_controller_registrar_ = |
| 400 base ::MakeUnique<AcceleratorControllerRegistrar>( | 402 base ::MakeUnique<AcceleratorControllerRegistrar>( |
| 401 window_manager_, accelerator_namespace_id); | 403 window_manager_, accelerator_namespace_id); |
| 402 return base::MakeUnique<AcceleratorController>( | 404 return base::MakeUnique<AcceleratorController>( |
| 403 accelerator_controller_delegate_.get(), | 405 accelerator_controller_delegate_.get(), |
| 404 accelerator_controller_registrar_.get()); | 406 accelerator_controller_registrar_.get()); |
| 405 } | 407 } |
| 406 | 408 |
| 407 } // namespace mus | 409 } // namespace mus |
| 408 } // namespace ash | 410 } // namespace ash |
| OLD | NEW |