| 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/keyboard/keyboard_ui.h" | 10 #include "ash/common/keyboard/keyboard_ui.h" |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 window_tree_client()->AddObserver(this); | 117 window_tree_client()->AddObserver(this); |
| 118 WmShell::Set(this); | 118 WmShell::Set(this); |
| 119 | 119 |
| 120 uint16_t accelerator_namespace_id = 0u; | 120 uint16_t accelerator_namespace_id = 0u; |
| 121 const bool add_result = | 121 const bool add_result = |
| 122 window_manager->GetNextAcceleratorNamespaceId(&accelerator_namespace_id); | 122 window_manager->GetNextAcceleratorNamespaceId(&accelerator_namespace_id); |
| 123 // WmShellMus is created early on, so that this should always succeed. | 123 // WmShellMus is created early on, so that this should always succeed. |
| 124 DCHECK(add_result); | 124 DCHECK(add_result); |
| 125 accelerator_controller_delegate_.reset(new AcceleratorControllerDelegateMus); | 125 accelerator_controller_delegate_.reset( |
| 126 new AcceleratorControllerDelegateMus(window_manager_->connector())); |
| 126 accelerator_controller_registrar_.reset(new AcceleratorControllerRegistrar( | 127 accelerator_controller_registrar_.reset(new AcceleratorControllerRegistrar( |
| 127 window_manager_, accelerator_namespace_id)); | 128 window_manager_, accelerator_namespace_id)); |
| 128 SetAcceleratorController(base::MakeUnique<AcceleratorController>( | 129 SetAcceleratorController(base::MakeUnique<AcceleratorController>( |
| 129 accelerator_controller_delegate_.get(), | 130 accelerator_controller_delegate_.get(), |
| 130 accelerator_controller_registrar_.get())); | 131 accelerator_controller_registrar_.get())); |
| 131 immersive_handler_factory_.reset(new ImmersiveHandlerFactoryMus); | 132 immersive_handler_factory_.reset(new ImmersiveHandlerFactoryMus); |
| 132 | 133 |
| 133 CreateMaximizeModeController(); | 134 CreateMaximizeModeController(); |
| 134 | 135 |
| 135 CreateMruWindowTracker(); | 136 CreateMruWindowTracker(); |
| (...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 436 OnWindowActivated(gained_active, lost_active)); | 437 OnWindowActivated(gained_active, lost_active)); |
| 437 } | 438 } |
| 438 | 439 |
| 439 void WmShellMus::OnDidDestroyClient(ui::WindowTreeClient* client) { | 440 void WmShellMus::OnDidDestroyClient(ui::WindowTreeClient* client) { |
| 440 DCHECK_EQ(window_tree_client(), client); | 441 DCHECK_EQ(window_tree_client(), client); |
| 441 client->RemoveObserver(this); | 442 client->RemoveObserver(this); |
| 442 } | 443 } |
| 443 | 444 |
| 444 } // namespace mus | 445 } // namespace mus |
| 445 } // namespace ash | 446 } // namespace ash |
| OLD | NEW |