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_ash.h" | 10 #include "ash/screen_util.h" |
11 #include "ash/shell.h" | 11 #include "ash/shell.h" |
12 #include "ash/test/ash_test_base.h" | 12 #include "ash/test/ash_test_base.h" |
13 #include "ash/test/display_manager_test_api.h" | 13 #include "ash/test/display_manager_test_api.h" |
14 #include "ash/touch/touch_hud_debug.h" | 14 #include "ash/touch/touch_hud_debug.h" |
15 #include "ash/touch/touch_hud_projection.h" | 15 #include "ash/touch/touch_hud_projection.h" |
16 #include "base/command_line.h" | 16 #include "base/command_line.h" |
17 #include "base/format_macros.h" | 17 #include "base/format_macros.h" |
18 #include "base/strings/stringprintf.h" | 18 #include "base/strings/stringprintf.h" |
19 #include "ui/aura/window.h" | 19 #include "ui/aura/window.h" |
20 | 20 |
(...skipping 21 matching lines...) Expand all Loading... |
42 CreateDisplayInfo(external_display_id_, gfx::Rect(1, 1, 100, 100)); | 42 CreateDisplayInfo(external_display_id_, gfx::Rect(1, 1, 100, 100)); |
43 mirrored_display_info_ = | 43 mirrored_display_info_ = |
44 CreateDisplayInfo(mirrored_display_id_, gfx::Rect(0, 0, 100, 100)); | 44 CreateDisplayInfo(mirrored_display_id_, gfx::Rect(0, 0, 100, 100)); |
45 } | 45 } |
46 | 46 |
47 gfx::Display GetPrimaryDisplay() { | 47 gfx::Display GetPrimaryDisplay() { |
48 return Shell::GetScreen()->GetPrimaryDisplay(); | 48 return Shell::GetScreen()->GetPrimaryDisplay(); |
49 } | 49 } |
50 | 50 |
51 const gfx::Display& GetSecondaryDisplay() { | 51 const gfx::Display& GetSecondaryDisplay() { |
52 return ScreenAsh::GetSecondaryDisplay(); | 52 return ScreenUtil::GetSecondaryDisplay(); |
53 } | 53 } |
54 | 54 |
55 void SetupSingleDisplay() { | 55 void SetupSingleDisplay() { |
56 display_info_list_.clear(); | 56 display_info_list_.clear(); |
57 display_info_list_.push_back(internal_display_info_); | 57 display_info_list_.push_back(internal_display_info_); |
58 GetDisplayManager()->OnNativeDisplaysChanged(display_info_list_); | 58 GetDisplayManager()->OnNativeDisplaysChanged(display_info_list_); |
59 } | 59 } |
60 | 60 |
61 void SetupDualDisplays() { | 61 void SetupDualDisplays() { |
62 display_info_list_.clear(); | 62 display_info_list_.clear(); |
(...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
588 SendTouchEventToInternalHud(ui::ET_TOUCH_PRESSED, gfx::Point(10, 10), 1); | 588 SendTouchEventToInternalHud(ui::ET_TOUCH_PRESSED, gfx::Point(10, 10), 1); |
589 EXPECT_EQ(1, GetInternalTouchPointsCount()); | 589 EXPECT_EQ(1, GetInternalTouchPointsCount()); |
590 | 590 |
591 // Disabling projection touch HUD shoud remove it without crashing. | 591 // Disabling projection touch HUD shoud remove it without crashing. |
592 DisableTouchHudProjection(); | 592 DisableTouchHudProjection(); |
593 EXPECT_EQ(NULL, GetInternalTouchHudProjection()); | 593 EXPECT_EQ(NULL, GetInternalTouchHudProjection()); |
594 } | 594 } |
595 | 595 |
596 } // namespace internal | 596 } // namespace internal |
597 } // namespace ash | 597 } // namespace ash |
OLD | NEW |