| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/root_window_controller.h" | 5 #include "ash/root_window_controller.h" |
| 6 | 6 |
| 7 #include <queue> | 7 #include <queue> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "ash/aura/aura_layout_manager_adapter.h" | 10 #include "ash/aura/aura_layout_manager_adapter.h" |
| (...skipping 818 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 829 } | 829 } |
| 830 | 830 |
| 831 void RootWindowController::OnTouchHudProjectionToggled(bool enabled) { | 831 void RootWindowController::OnTouchHudProjectionToggled(bool enabled) { |
| 832 if (enabled) | 832 if (enabled) |
| 833 EnableTouchHudProjection(); | 833 EnableTouchHudProjection(); |
| 834 else | 834 else |
| 835 DisableTouchHudProjection(); | 835 DisableTouchHudProjection(); |
| 836 } | 836 } |
| 837 | 837 |
| 838 RootWindowController* GetRootWindowController(const aura::Window* root_window) { | 838 RootWindowController* GetRootWindowController(const aura::Window* root_window) { |
| 839 if (!root_window) | 839 return root_window ? GetRootWindowSettings(root_window)->controller : nullptr; |
| 840 return nullptr; | |
| 841 | |
| 842 if (Shell::GetInstance()->in_mus()) { | |
| 843 // On mus, like desktop aura, each top-level widget has its own root window, | |
| 844 // so |root_window| is not necessarily the display's root. For now, just | |
| 845 // the use the primary display root. | |
| 846 // TODO(jamescook): Multi-display support. This depends on how mus windows | |
| 847 // will be owned by displays. | |
| 848 aura::Window* primary_root_window = Shell::GetInstance() | |
| 849 ->window_tree_host_manager() | |
| 850 ->GetPrimaryRootWindow(); | |
| 851 return GetRootWindowSettings(primary_root_window)->controller; | |
| 852 } | |
| 853 | |
| 854 return GetRootWindowSettings(root_window)->controller; | |
| 855 } | 840 } |
| 856 | 841 |
| 857 } // namespace ash | 842 } // namespace ash |
| OLD | NEW |