| 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/display/display_manager.h" | 8 #include "ash/display/display_manager.h" |
| 9 #include "ash/root_window_controller.h" | 9 #include "ash/root_window_controller.h" |
| 10 #include "ash/shell.h" |
| 10 #include "ash/test/ash_test_base.h" | 11 #include "ash/test/ash_test_base.h" |
| 11 #include "ash/test/display_manager_test_api.h" | 12 #include "ash/test/display_manager_test_api.h" |
| 13 #include "ash/touch/touch_hud_debug.h" |
| 12 #include "ash/wm/property_util.h" | 14 #include "ash/wm/property_util.h" |
| 13 #include "base/command_line.h" | 15 #include "base/command_line.h" |
| 14 #include "base/format_macros.h" | 16 #include "base/format_macros.h" |
| 15 #include "base/strings/stringprintf.h" | 17 #include "base/strings/stringprintf.h" |
| 16 | 18 |
| 17 namespace ash { | 19 namespace ash { |
| 18 namespace internal { | 20 namespace internal { |
| 19 | 21 |
| 20 class TouchHudTest : public test::AshTestBase { | 22 class TouchHudTest : public test::AshTestBase { |
| 21 public: | 23 public: |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 aura::RootWindow* root = GetPrimaryRootWindow(); | 203 aura::RootWindow* root = GetPrimaryRootWindow(); |
| 202 return GetRootWindowController(root); | 204 return GetRootWindowController(root); |
| 203 } | 205 } |
| 204 | 206 |
| 205 internal::RootWindowController* GetSecondaryRootController() { | 207 internal::RootWindowController* GetSecondaryRootController() { |
| 206 aura::RootWindow* root = GetSecondaryRootWindow(); | 208 aura::RootWindow* root = GetSecondaryRootWindow(); |
| 207 return GetRootWindowController(root); | 209 return GetRootWindowController(root); |
| 208 } | 210 } |
| 209 | 211 |
| 210 internal::TouchObserverHUD* GetInternalTouchHud() { | 212 internal::TouchObserverHUD* GetInternalTouchHud() { |
| 211 return GetInternalRootController()->touch_observer_hud(); | 213 return GetInternalRootController()->touch_hud_debug(); |
| 212 } | 214 } |
| 213 | 215 |
| 214 internal::TouchObserverHUD* GetExternalTouchHud() { | 216 internal::TouchObserverHUD* GetExternalTouchHud() { |
| 215 return GetExternalRootController()->touch_observer_hud(); | 217 return GetExternalRootController()->touch_hud_debug(); |
| 216 } | 218 } |
| 217 | 219 |
| 218 internal::TouchObserverHUD* GetPrimaryTouchHud() { | 220 internal::TouchObserverHUD* GetPrimaryTouchHud() { |
| 219 return GetPrimaryRootController()->touch_observer_hud(); | 221 return GetPrimaryRootController()->touch_hud_debug(); |
| 220 } | 222 } |
| 221 | 223 |
| 222 internal::TouchObserverHUD* GetSecondaryTouchHud() { | 224 internal::TouchObserverHUD* GetSecondaryTouchHud() { |
| 223 return GetSecondaryRootController()->touch_observer_hud(); | 225 return GetSecondaryRootController()->touch_hud_debug(); |
| 224 } | 226 } |
| 225 | 227 |
| 226 DisplayInfo CreateDisplayInfo(int64 id, const gfx::Rect& bounds) { | 228 DisplayInfo CreateDisplayInfo(int64 id, const gfx::Rect& bounds) { |
| 227 DisplayInfo info(id, base::StringPrintf("x-%"PRId64, id), false); | 229 DisplayInfo info(id, base::StringPrintf("x-%"PRId64, id), false); |
| 228 info.SetBounds(bounds); | 230 info.SetBounds(bounds); |
| 229 return info; | 231 return info; |
| 230 } | 232 } |
| 231 | 233 |
| 232 int64 internal_display_id_; | 234 int64 internal_display_id_; |
| 233 int64 external_display_id_; | 235 int64 external_display_id_; |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 407 // Add the internal display back. | 409 // Add the internal display back. |
| 408 AddInternalDisplay(); | 410 AddInternalDisplay(); |
| 409 | 411 |
| 410 // Check if the display's touch HUD is set correctly. | 412 // Check if the display's touch HUD is set correctly. |
| 411 EXPECT_EQ(internal_display_id(), GetPrimaryDisplay().id()); | 413 EXPECT_EQ(internal_display_id(), GetPrimaryDisplay().id()); |
| 412 CheckInternalDisplay(); | 414 CheckInternalDisplay(); |
| 413 } | 415 } |
| 414 | 416 |
| 415 } // namespace internal | 417 } // namespace internal |
| 416 } // namespace ash | 418 } // namespace ash |
| OLD | NEW |