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/gfx/screen.h" | 5 #include "ui/gfx/screen.h" |
6 | 6 |
7 #include <windows.h> | 7 #include <windows.h> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "ui/gfx/monitor.h" | 10 #include "ui/gfx/monitor.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 gfx::Monitor monitor(0, gfx::Rect(monitor_info.rcMonitor)); | 23 gfx::Monitor monitor(0, gfx::Rect(monitor_info.rcMonitor)); |
24 monitor.set_work_area(gfx::Rect(monitor_info.rcWork)); | 24 monitor.set_work_area(gfx::Rect(monitor_info.rcWork)); |
25 return monitor; | 25 return monitor; |
26 } | 26 } |
27 | 27 |
28 } // namespace | 28 } // namespace |
29 | 29 |
30 namespace gfx { | 30 namespace gfx { |
31 | 31 |
32 // static | 32 // static |
| 33 bool Screen::IsDIPEnabled() { |
| 34 return false; |
| 35 } |
| 36 |
| 37 // static |
33 gfx::Point Screen::GetCursorScreenPoint() { | 38 gfx::Point Screen::GetCursorScreenPoint() { |
34 POINT pt; | 39 POINT pt; |
35 GetCursorPos(&pt); | 40 GetCursorPos(&pt); |
36 return gfx::Point(pt); | 41 return gfx::Point(pt); |
37 } | 42 } |
38 | 43 |
39 // static | 44 // static |
40 gfx::NativeWindow Screen::GetWindowAtCursorScreenPoint() { | 45 gfx::NativeWindow Screen::GetWindowAtCursorScreenPoint() { |
41 POINT location; | 46 POINT location; |
42 return GetCursorPos(&location) ? WindowFromPoint(location) : NULL; | 47 return GetCursorPos(&location) ? WindowFromPoint(location) : NULL; |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 | 84 |
80 // static | 85 // static |
81 gfx::Monitor Screen::GetMonitorMatching(const gfx::Rect& match_rect) { | 86 gfx::Monitor Screen::GetMonitorMatching(const gfx::Rect& match_rect) { |
82 RECT other_bounds_rect = match_rect.ToRECT(); | 87 RECT other_bounds_rect = match_rect.ToRECT(); |
83 MONITORINFO monitor_info = GetMonitorInfoForMonitor(MonitorFromRect( | 88 MONITORINFO monitor_info = GetMonitorInfoForMonitor(MonitorFromRect( |
84 &other_bounds_rect, MONITOR_DEFAULTTONEAREST)); | 89 &other_bounds_rect, MONITOR_DEFAULTTONEAREST)); |
85 return GetMonitor(monitor_info); | 90 return GetMonitor(monitor_info); |
86 } | 91 } |
87 | 92 |
88 } // namespace gfx | 93 } // namespace gfx |
OLD | NEW |