Chromium Code Reviews| 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/ash_constants.h" | 10 #include "ash/ash_constants.h" |
| (...skipping 1038 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1049 | 1049 |
| 1050 void RootWindowController::OnTouchHudProjectionToggled(bool enabled) { | 1050 void RootWindowController::OnTouchHudProjectionToggled(bool enabled) { |
| 1051 if (enabled) | 1051 if (enabled) |
| 1052 EnableTouchHudProjection(); | 1052 EnableTouchHudProjection(); |
| 1053 else | 1053 else |
| 1054 DisableTouchHudProjection(); | 1054 DisableTouchHudProjection(); |
| 1055 } | 1055 } |
| 1056 | 1056 |
| 1057 RootWindowController* GetRootWindowController( | 1057 RootWindowController* GetRootWindowController( |
| 1058 const aura::Window* root_window) { | 1058 const aura::Window* root_window) { |
| 1059 return root_window ? GetRootWindowSettings(root_window)->controller : NULL; | 1059 if (!root_window) |
| 1060 return nullptr; | |
| 1061 | |
| 1062 if (Shell::GetInstance()->in_mus()) { | |
| 1063 // Look up the root for the display nearest |root_window|. | |
| 1064 display::Display display = display::Screen::GetScreen()->GetDisplayMatching( | |
| 1065 root_window->GetBoundsInScreen()); | |
| 1066 aura::Window* root_window_for_display = | |
| 1067 Shell::GetInstance() | |
| 1068 ->window_tree_host_manager() | |
| 1069 ->GetRootWindowForDisplayId(display.id()); | |
| 1070 DCHECK(root_window_for_display); | |
| 1071 return GetRootWindowSettings(root_window_for_display)->controller; | |
| 1072 } | |
| 1073 return GetRootWindowSettings(root_window)->controller; | |
|
oshima
2016/05/12 00:40:56
This behaves differently if the most of the root w
James Cook
2016/05/12 16:43:12
I'm sorry, I don't completely understand.
I under
| |
| 1060 } | 1074 } |
| 1061 | 1075 |
| 1062 } // namespace ash | 1076 } // namespace ash |
| OLD | NEW |