| 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/shell_port_mash.h" | 5 #include "ash/mus/bridge/shell_port_mash.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "ash/accelerators/accelerator_controller.h" | 9 #include "ash/accelerators/accelerator_controller.h" |
| 10 #include "ash/accelerators/accelerator_controller_delegate_aura.h" | 10 #include "ash/accelerators/accelerator_controller_delegate_aura.h" |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 | 147 |
| 148 void ShellPortMash::Shutdown() { | 148 void ShellPortMash::Shutdown() { |
| 149 if (mus_state_) | 149 if (mus_state_) |
| 150 mus_state_->pointer_watcher_adapter.reset(); | 150 mus_state_->pointer_watcher_adapter.reset(); |
| 151 | 151 |
| 152 ShellPort::Shutdown(); | 152 ShellPort::Shutdown(); |
| 153 | 153 |
| 154 window_manager_->DeleteAllRootWindowControllers(); | 154 window_manager_->DeleteAllRootWindowControllers(); |
| 155 } | 155 } |
| 156 | 156 |
| 157 bool ShellPortMash::IsRunningInMash() const { | |
| 158 return GetAshConfig() == Config::MASH; | |
| 159 } | |
| 160 | |
| 161 Config ShellPortMash::GetAshConfig() const { | 157 Config ShellPortMash::GetAshConfig() const { |
| 162 return window_manager_->config(); | 158 return window_manager_->config(); |
| 163 } | 159 } |
| 164 | 160 |
| 165 WmWindow* ShellPortMash::GetPrimaryRootWindow() { | 161 WmWindow* ShellPortMash::GetPrimaryRootWindow() { |
| 166 // NOTE: This is called before the RootWindowController has been created, so | 162 // NOTE: This is called before the RootWindowController has been created, so |
| 167 // it can't call through to RootWindowController to get all windows. | 163 // it can't call through to RootWindowController to get all windows. |
| 168 return primary_root_window_; | 164 return primary_root_window_; |
| 169 } | 165 } |
| 170 | 166 |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 458 mash_state_->accelerator_controller_registrar = | 454 mash_state_->accelerator_controller_registrar = |
| 459 base ::MakeUnique<AcceleratorControllerRegistrar>( | 455 base ::MakeUnique<AcceleratorControllerRegistrar>( |
| 460 window_manager_, accelerator_namespace_id); | 456 window_manager_, accelerator_namespace_id); |
| 461 return base::MakeUnique<AcceleratorController>( | 457 return base::MakeUnique<AcceleratorController>( |
| 462 mash_state_->accelerator_controller_delegate.get(), | 458 mash_state_->accelerator_controller_delegate.get(), |
| 463 mash_state_->accelerator_controller_registrar.get()); | 459 mash_state_->accelerator_controller_registrar.get()); |
| 464 } | 460 } |
| 465 | 461 |
| 466 } // namespace mus | 462 } // namespace mus |
| 467 } // namespace ash | 463 } // namespace ash |
| OLD | NEW |