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

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

Issue 2761063002: Move more from WmShell to Shell (Closed)
Patch Set: merge Created 3 years, 9 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
« no previous file with comments | « ash/mus/bridge/wm_shell_mus.h ('k') | ash/mus/network_connect_delegate_mus.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/key_event_watcher.h" 10 #include "ash/common/key_event_watcher.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 views::PointerWatcherEventRouter* pointer_watcher_event_router, 83 views::PointerWatcherEventRouter* pointer_watcher_event_router,
84 bool create_session_state_delegate_stub) 84 bool create_session_state_delegate_stub)
85 : window_manager_(window_manager), 85 : window_manager_(window_manager),
86 primary_root_window_(primary_root_window), 86 primary_root_window_(primary_root_window),
87 pointer_watcher_event_router_(pointer_watcher_event_router) { 87 pointer_watcher_event_router_(pointer_watcher_event_router) {
88 if (create_session_state_delegate_stub) 88 if (create_session_state_delegate_stub)
89 session_state_delegate_ = base::MakeUnique<SessionStateDelegateStub>(); 89 session_state_delegate_ = base::MakeUnique<SessionStateDelegateStub>();
90 DCHECK(primary_root_window_); 90 DCHECK(primary_root_window_);
91 91
92 immersive_handler_factory_.reset(new ImmersiveHandlerFactoryMus); 92 immersive_handler_factory_.reset(new ImmersiveHandlerFactoryMus);
93
94 SetKeyboardUI(KeyboardUIMus::Create(window_manager_->connector()));
95 } 93 }
96 94
97 WmShellMus::~WmShellMus() { 95 WmShellMus::~WmShellMus() {
98 } 96 }
99 97
100 // static 98 // static
101 WmShellMus* WmShellMus::Get() { 99 WmShellMus* WmShellMus::Get() {
102 return static_cast<WmShellMus*>(WmShell::Get()); 100 return static_cast<WmShellMus*>(WmShell::Get());
103 } 101 }
104 102
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 WmWindow* workspace_window) { 278 WmWindow* workspace_window) {
281 return base::MakeUnique<WorkspaceEventHandlerMus>( 279 return base::MakeUnique<WorkspaceEventHandlerMus>(
282 WmWindow::GetAuraWindow(workspace_window)); 280 WmWindow::GetAuraWindow(workspace_window));
283 } 281 }
284 282
285 std::unique_ptr<ImmersiveFullscreenController> 283 std::unique_ptr<ImmersiveFullscreenController>
286 WmShellMus::CreateImmersiveFullscreenController() { 284 WmShellMus::CreateImmersiveFullscreenController() {
287 return base::MakeUnique<ImmersiveFullscreenController>(); 285 return base::MakeUnique<ImmersiveFullscreenController>();
288 } 286 }
289 287
288 std::unique_ptr<KeyboardUI> WmShellMus::CreateKeyboardUI() {
289 return KeyboardUIMus::Create(window_manager_->connector());
290 }
291
290 std::unique_ptr<KeyEventWatcher> WmShellMus::CreateKeyEventWatcher() { 292 std::unique_ptr<KeyEventWatcher> WmShellMus::CreateKeyEventWatcher() {
291 // TODO: needs implementation for mus, http://crbug.com/649600. 293 // TODO: needs implementation for mus, http://crbug.com/649600.
292 NOTIMPLEMENTED(); 294 NOTIMPLEMENTED();
293 return std::unique_ptr<KeyEventWatcher>(); 295 return std::unique_ptr<KeyEventWatcher>();
294 } 296 }
295 297
296 SessionStateDelegate* WmShellMus::GetSessionStateDelegate() { 298 SessionStateDelegate* WmShellMus::GetSessionStateDelegate() {
297 return session_state_delegate_ 299 return session_state_delegate_
298 ? session_state_delegate_.get() 300 ? session_state_delegate_.get()
299 : Shell::GetInstance()->session_state_delegate(); 301 : Shell::GetInstance()->session_state_delegate();
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 accelerator_controller_registrar_ = 365 accelerator_controller_registrar_ =
364 base ::MakeUnique<AcceleratorControllerRegistrar>( 366 base ::MakeUnique<AcceleratorControllerRegistrar>(
365 window_manager_, accelerator_namespace_id); 367 window_manager_, accelerator_namespace_id);
366 return base::MakeUnique<AcceleratorController>( 368 return base::MakeUnique<AcceleratorController>(
367 accelerator_controller_delegate_.get(), 369 accelerator_controller_delegate_.get(),
368 accelerator_controller_registrar_.get()); 370 accelerator_controller_registrar_.get());
369 } 371 }
370 372
371 } // namespace mus 373 } // namespace mus
372 } // namespace ash 374 } // namespace ash
OLDNEW
« no previous file with comments | « ash/mus/bridge/wm_shell_mus.h ('k') | ash/mus/network_connect_delegate_mus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698