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 27 matching lines...) Expand all Loading... |
38 | 38 |
39 internal_display_info_ = | 39 internal_display_info_ = |
40 CreateDisplayInfo(internal_display_id_, gfx::Rect(0, 0, 500, 500)); | 40 CreateDisplayInfo(internal_display_id_, gfx::Rect(0, 0, 500, 500)); |
41 external_display_info_ = | 41 external_display_info_ = |
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 gfx::Screen::GetScreen()->GetPrimaryDisplay(); |
49 } | 49 } |
50 | 50 |
51 const gfx::Display& GetSecondaryDisplay() { | 51 const gfx::Display& GetSecondaryDisplay() { |
52 return ScreenUtil::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_); |
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
581 | 581 |
582 SendTouchEventToInternalHud(ui::ET_TOUCH_PRESSED, gfx::Point(10, 10), 1); | 582 SendTouchEventToInternalHud(ui::ET_TOUCH_PRESSED, gfx::Point(10, 10), 1); |
583 EXPECT_EQ(1, GetInternalTouchPointsCount()); | 583 EXPECT_EQ(1, GetInternalTouchPointsCount()); |
584 | 584 |
585 // Disabling projection touch HUD shoud remove it without crashing. | 585 // Disabling projection touch HUD shoud remove it without crashing. |
586 DisableTouchHudProjection(); | 586 DisableTouchHudProjection(); |
587 EXPECT_EQ(NULL, GetInternalTouchHudProjection()); | 587 EXPECT_EQ(NULL, GetInternalTouchHudProjection()); |
588 } | 588 } |
589 | 589 |
590 } // namespace ash | 590 } // namespace ash |
OLD | NEW |