| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/touch/touch_observer_hud.h" | 5 #include "ash/touch/touch_observer_hud.h" |
| 6 | 6 |
| 7 #include "ash/ash_switches.h" | 7 #include "ash/ash_switches.h" |
| 8 #include "ash/root_window_controller.h" | 8 #include "ash/root_window_controller.h" |
| 9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
| 10 #include "ash/test/ash_test_base.h" | 10 #include "ash/test/ash_test_base.h" |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 return GetWindowTreeHostManager()->GetRootWindowForDisplayId(display.id()); | 144 return GetWindowTreeHostManager()->GetRootWindowForDisplayId(display.id()); |
| 145 } | 145 } |
| 146 | 146 |
| 147 aura::Window* GetSecondaryRootWindow() { | 147 aura::Window* GetSecondaryRootWindow() { |
| 148 const display::Display& display = display_manager()->GetSecondaryDisplay(); | 148 const display::Display& display = display_manager()->GetSecondaryDisplay(); |
| 149 return GetWindowTreeHostManager()->GetRootWindowForDisplayId(display.id()); | 149 return GetWindowTreeHostManager()->GetRootWindowForDisplayId(display.id()); |
| 150 } | 150 } |
| 151 | 151 |
| 152 RootWindowController* GetInternalRootController() { | 152 RootWindowController* GetInternalRootController() { |
| 153 aura::Window* root = GetInternalRootWindow(); | 153 aura::Window* root = GetInternalRootWindow(); |
| 154 return GetRootWindowController(root); | 154 return RootWindowController::ForWindow(root); |
| 155 } | 155 } |
| 156 | 156 |
| 157 RootWindowController* GetExternalRootController() { | 157 RootWindowController* GetExternalRootController() { |
| 158 aura::Window* root = GetExternalRootWindow(); | 158 aura::Window* root = GetExternalRootWindow(); |
| 159 return GetRootWindowController(root); | 159 return RootWindowController::ForWindow(root); |
| 160 } | 160 } |
| 161 | 161 |
| 162 RootWindowController* GetPrimaryRootController() { | 162 RootWindowController* GetPrimaryRootController() { |
| 163 aura::Window* root = GetPrimaryRootWindow(); | 163 aura::Window* root = GetPrimaryRootWindow(); |
| 164 return GetRootWindowController(root); | 164 return RootWindowController::ForWindow(root); |
| 165 } | 165 } |
| 166 | 166 |
| 167 RootWindowController* GetSecondaryRootController() { | 167 RootWindowController* GetSecondaryRootController() { |
| 168 aura::Window* root = GetSecondaryRootWindow(); | 168 aura::Window* root = GetSecondaryRootWindow(); |
| 169 return GetRootWindowController(root); | 169 return RootWindowController::ForWindow(root); |
| 170 } | 170 } |
| 171 | 171 |
| 172 display::ManagedDisplayInfo CreateDisplayInfo(int64_t id, | 172 display::ManagedDisplayInfo CreateDisplayInfo(int64_t id, |
| 173 const gfx::Rect& bounds) { | 173 const gfx::Rect& bounds) { |
| 174 display::ManagedDisplayInfo info(id, base::StringPrintf("x-%" PRId64, id), | 174 display::ManagedDisplayInfo info(id, base::StringPrintf("x-%" PRId64, id), |
| 175 false); | 175 false); |
| 176 info.SetBounds(bounds); | 176 info.SetBounds(bounds); |
| 177 return info; | 177 return info; |
| 178 } | 178 } |
| 179 | 179 |
| (...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 565 | 565 |
| 566 SendTouchEventToInternalHud(ui::ET_TOUCH_PRESSED, gfx::Point(10, 10), 1); | 566 SendTouchEventToInternalHud(ui::ET_TOUCH_PRESSED, gfx::Point(10, 10), 1); |
| 567 EXPECT_EQ(1, GetInternalTouchPointsCount()); | 567 EXPECT_EQ(1, GetInternalTouchPointsCount()); |
| 568 | 568 |
| 569 // Disabling projection touch HUD shoud remove it without crashing. | 569 // Disabling projection touch HUD shoud remove it without crashing. |
| 570 DisableTouchHudProjection(); | 570 DisableTouchHudProjection(); |
| 571 EXPECT_EQ(NULL, GetInternalTouchHudProjection()); | 571 EXPECT_EQ(NULL, GetInternalTouchHudProjection()); |
| 572 } | 572 } |
| 573 | 573 |
| 574 } // namespace ash | 574 } // namespace ash |
| OLD | NEW |