| 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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 session_state_delegate_(new SessionStateDelegateStub) { | 118 session_state_delegate_(new SessionStateDelegateStub) { |
| 119 window_tree_client()->AddObserver(this); | 119 window_tree_client()->AddObserver(this); |
| 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. |
| 126 DCHECK(add_result); | 126 DCHECK(add_result); |
| 127 accelerator_controller_delegate_.reset( | 127 accelerator_controller_delegate_.reset( |
| 128 new AcceleratorControllerDelegateMus(window_manager_->connector())); | 128 new AcceleratorControllerDelegateMus(window_manager_)); |
| 129 accelerator_controller_registrar_.reset(new AcceleratorControllerRegistrar( | 129 accelerator_controller_registrar_.reset(new AcceleratorControllerRegistrar( |
| 130 window_manager_, accelerator_namespace_id)); | 130 window_manager_, accelerator_namespace_id)); |
| 131 SetAcceleratorController(base::MakeUnique<AcceleratorController>( | 131 SetAcceleratorController(base::MakeUnique<AcceleratorController>( |
| 132 accelerator_controller_delegate_.get(), | 132 accelerator_controller_delegate_.get(), |
| 133 accelerator_controller_registrar_.get())); | 133 accelerator_controller_registrar_.get())); |
| 134 immersive_handler_factory_.reset(new ImmersiveHandlerFactoryMus); | 134 immersive_handler_factory_.reset(new ImmersiveHandlerFactoryMus); |
| 135 | 135 |
| 136 CreateMaximizeModeController(); | 136 CreateMaximizeModeController(); |
| 137 | 137 |
| 138 CreateMruWindowTracker(); | 138 CreateMruWindowTracker(); |
| (...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 463 observer.OnWindowActivated(gained_active, lost_active); | 463 observer.OnWindowActivated(gained_active, lost_active); |
| 464 } | 464 } |
| 465 | 465 |
| 466 void WmShellMus::OnDidDestroyClient(ui::WindowTreeClient* client) { | 466 void WmShellMus::OnDidDestroyClient(ui::WindowTreeClient* client) { |
| 467 DCHECK_EQ(window_tree_client(), client); | 467 DCHECK_EQ(window_tree_client(), client); |
| 468 client->RemoveObserver(this); | 468 client->RemoveObserver(this); |
| 469 } | 469 } |
| 470 | 470 |
| 471 } // namespace mus | 471 } // namespace mus |
| 472 } // namespace ash | 472 } // namespace ash |
| OLD | NEW |