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

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

Issue 2318223003: mash: Migrate wallpaper controllers to ash/common. (Closed)
Patch Set: Cleanup. 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/keyboard/keyboard_ui.h" 10 #include "ash/common/keyboard/keyboard_ui.h"
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 106
107 } // namespace 107 } // namespace
108 108
109 WmShellMus::WmShellMus( 109 WmShellMus::WmShellMus(
110 std::unique_ptr<ShellDelegate> shell_delegate, 110 std::unique_ptr<ShellDelegate> shell_delegate,
111 WindowManager* window_manager, 111 WindowManager* window_manager,
112 views::PointerWatcherEventRouter* pointer_watcher_event_router) 112 views::PointerWatcherEventRouter* pointer_watcher_event_router)
113 : WmShell(std::move(shell_delegate)), 113 : WmShell(std::move(shell_delegate)),
114 window_manager_(window_manager), 114 window_manager_(window_manager),
115 pointer_watcher_event_router_(pointer_watcher_event_router), 115 pointer_watcher_event_router_(pointer_watcher_event_router),
116 session_state_delegate_(new SessionStateDelegateStub) { 116 session_state_delegate_(new SessionStateDelegateStub),
117 blocking_pool_(
118 new base::SequencedWorkerPool(3,
James Cook 2016/09/07 21:27:05 Do you need to call blocking_pool_->Shutdown()? A
msw 2016/09/07 22:28:24 Done; that fixes mash_unittests. I'll also ask Sco
sky 2016/09/08 04:15:22 I believe you want to make it so you can inject a
msw 2016/09/08 19:52:15 Done; I moved Shell::blocking_pool_ to WmShell, ma
119 "MashBlocking",
120 base::TaskPriority::USER_VISIBLE)) {
117 window_tree_client()->AddObserver(this); 121 window_tree_client()->AddObserver(this);
118 WmShell::Set(this); 122 WmShell::Set(this);
119 123
120 uint16_t accelerator_namespace_id = 0u; 124 uint16_t accelerator_namespace_id = 0u;
121 const bool add_result = 125 const bool add_result =
122 window_manager->GetNextAcceleratorNamespaceId(&accelerator_namespace_id); 126 window_manager->GetNextAcceleratorNamespaceId(&accelerator_namespace_id);
123 // WmShellMus is created early on, so that this should always succeed. 127 // WmShellMus is created early on, so that this should always succeed.
124 DCHECK(add_result); 128 DCHECK(add_result);
125 accelerator_controller_delegate_.reset( 129 accelerator_controller_delegate_.reset(
126 new AcceleratorControllerDelegateMus(window_manager_->connector())); 130 new AcceleratorControllerDelegateMus(window_manager_->connector()));
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 void WmShellMus::RemovePointerWatcher(views::PointerWatcher* watcher) { 403 void WmShellMus::RemovePointerWatcher(views::PointerWatcher* watcher) {
400 pointer_watcher_event_router_->RemovePointerWatcher(watcher); 404 pointer_watcher_event_router_->RemovePointerWatcher(watcher);
401 } 405 }
402 406
403 bool WmShellMus::IsTouchDown() { 407 bool WmShellMus::IsTouchDown() {
404 // TODO: implement me, http://crbug.com/634967. 408 // TODO: implement me, http://crbug.com/634967.
405 // NOTIMPLEMENTED is too spammy here. 409 // NOTIMPLEMENTED is too spammy here.
406 return false; 410 return false;
407 } 411 }
408 412
413 base::SequencedWorkerPool* WmShellMus::GetBlockingPool() {
414 return blocking_pool_.get();
415 }
416
409 #if defined(OS_CHROMEOS) 417 #if defined(OS_CHROMEOS)
410 void WmShellMus::ToggleIgnoreExternalKeyboard() { 418 void WmShellMus::ToggleIgnoreExternalKeyboard() {
411 NOTIMPLEMENTED(); 419 NOTIMPLEMENTED();
412 } 420 }
413 #endif // defined(OS_CHROMEOS) 421 #endif // defined(OS_CHROMEOS)
414 422
415 ui::WindowTreeClient* WmShellMus::window_tree_client() { 423 ui::WindowTreeClient* WmShellMus::window_tree_client() {
416 return window_manager_->window_tree_client(); 424 return window_manager_->window_tree_client();
417 } 425 }
418 426
(...skipping 18 matching lines...) Expand all
437 OnWindowActivated(gained_active, lost_active)); 445 OnWindowActivated(gained_active, lost_active));
438 } 446 }
439 447
440 void WmShellMus::OnDidDestroyClient(ui::WindowTreeClient* client) { 448 void WmShellMus::OnDidDestroyClient(ui::WindowTreeClient* client) {
441 DCHECK_EQ(window_tree_client(), client); 449 DCHECK_EQ(window_tree_client(), client);
442 client->RemoveObserver(this); 450 client->RemoveObserver(this);
443 } 451 }
444 452
445 } // namespace mus 453 } // namespace mus
446 } // namespace ash 454 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698