OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ui/aura/test/test_screen.h" | 5 #include "ui/aura/test/test_screen.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "ui/aura/root_window.h" | 8 #include "ui/aura/root_window.h" |
9 #include "ui/aura/window.h" | 9 #include "ui/aura/window.h" |
10 #include "ui/gfx/native_widget_types.h" | 10 #include "ui/gfx/native_widget_types.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 | 25 |
26 gfx::NativeWindow TestScreen::GetWindowAtCursorScreenPoint() { | 26 gfx::NativeWindow TestScreen::GetWindowAtCursorScreenPoint() { |
27 const gfx::Point point = gfx::Screen::GetCursorScreenPoint(); | 27 const gfx::Point point = gfx::Screen::GetCursorScreenPoint(); |
28 return root_window_->GetTopWindowContainingPoint(point); | 28 return root_window_->GetTopWindowContainingPoint(point); |
29 } | 29 } |
30 | 30 |
31 int TestScreen::GetNumMonitors() { | 31 int TestScreen::GetNumMonitors() { |
32 return 1; | 32 return 1; |
33 } | 33 } |
34 | 34 |
35 gfx::Monitor TestScreen::GetMonitorNearestWindow( | 35 gfx::Display TestScreen::GetMonitorNearestWindow( |
36 gfx::NativeWindow window) const { | 36 gfx::NativeWindow window) const { |
37 return GetMonitor(); | 37 return GetMonitor(); |
38 } | 38 } |
39 | 39 |
40 gfx::Monitor TestScreen::GetMonitorNearestPoint(const gfx::Point& point) const { | 40 gfx::Display TestScreen::GetMonitorNearestPoint(const gfx::Point& point) const { |
41 return GetMonitor(); | 41 return GetMonitor(); |
42 } | 42 } |
43 | 43 |
44 gfx::Monitor TestScreen::GetPrimaryMonitor() const { | 44 gfx::Display TestScreen::GetPrimaryMonitor() const { |
45 return GetMonitor(); | 45 return GetMonitor(); |
46 } | 46 } |
47 | 47 |
48 gfx::Monitor TestScreen::GetMonitor() const { | 48 gfx::Display TestScreen::GetMonitor() const { |
49 return gfx::Monitor(0, root_window_->bounds()); | 49 return gfx::Display(0, root_window_->bounds()); |
50 } | 50 } |
51 | 51 |
52 } // namespace aura | 52 } // namespace aura |
OLD | NEW |