| 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/screen_util.h" | 10 #include "ash/screen_util.h" |
| (...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 const gfx::Point& location, | 286 const gfx::Point& location, |
| 287 int touch_id) { | 287 int touch_id) { |
| 288 ui::TouchEvent event(type, location, touch_id, event_time); | 288 ui::TouchEvent event(type, location, touch_id, event_time); |
| 289 GetInternalTouchHudProjection()->OnTouchEvent(&event); | 289 GetInternalTouchHudProjection()->OnTouchEvent(&event); |
| 290 | 290 |
| 291 // Advance time for next event. | 291 // Advance time for next event. |
| 292 event_time += base::TimeDelta::FromMilliseconds(100); | 292 event_time += base::TimeDelta::FromMilliseconds(100); |
| 293 } | 293 } |
| 294 | 294 |
| 295 private: | 295 private: |
| 296 base::TimeDelta event_time; | 296 base::TimeTicks event_time; |
| 297 | 297 |
| 298 DISALLOW_COPY_AND_ASSIGN(TouchHudProjectionTest); | 298 DISALLOW_COPY_AND_ASSIGN(TouchHudProjectionTest); |
| 299 }; | 299 }; |
| 300 | 300 |
| 301 // Checks if debug touch HUD is correctly initialized for a single display. | 301 // Checks if debug touch HUD is correctly initialized for a single display. |
| 302 #if defined(OS_WIN) && !defined(USE_ASH) | 302 #if defined(OS_WIN) && !defined(USE_ASH) |
| 303 // TODO(msw): Broken on Windows. http://crbug.com/584038 | 303 // TODO(msw): Broken on Windows. http://crbug.com/584038 |
| 304 #define MAYBE_SingleDisplay DISABLED_SingleDisplay | 304 #define MAYBE_SingleDisplay DISABLED_SingleDisplay |
| 305 #else | 305 #else |
| 306 #define MAYBE_SingleDisplay SingleDisplay | 306 #define MAYBE_SingleDisplay SingleDisplay |
| (...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 608 | 608 |
| 609 SendTouchEventToInternalHud(ui::ET_TOUCH_PRESSED, gfx::Point(10, 10), 1); | 609 SendTouchEventToInternalHud(ui::ET_TOUCH_PRESSED, gfx::Point(10, 10), 1); |
| 610 EXPECT_EQ(1, GetInternalTouchPointsCount()); | 610 EXPECT_EQ(1, GetInternalTouchPointsCount()); |
| 611 | 611 |
| 612 // Disabling projection touch HUD shoud remove it without crashing. | 612 // Disabling projection touch HUD shoud remove it without crashing. |
| 613 DisableTouchHudProjection(); | 613 DisableTouchHudProjection(); |
| 614 EXPECT_EQ(NULL, GetInternalTouchHudProjection()); | 614 EXPECT_EQ(NULL, GetInternalTouchHudProjection()); |
| 615 } | 615 } |
| 616 | 616 |
| 617 } // namespace ash | 617 } // namespace ash |
| OLD | NEW |