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/desktop/desktop_screen_win.h" | 5 #include "ui/aura/desktop/desktop_screen_win.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "ui/aura/desktop/desktop_screen.h" | 8 #include "ui/aura/desktop/desktop_screen.h" |
9 #include "ui/aura/root_window.h" | 9 #include "ui/aura/root_window.h" |
10 #include "ui/aura/root_window_host.h" | 10 #include "ui/aura/root_window_host.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 //////////////////////////////////////////////////////////////////////////////// | 33 //////////////////////////////////////////////////////////////////////////////// |
34 // DesktopScreenWin, public: | 34 // DesktopScreenWin, public: |
35 | 35 |
36 DesktopScreenWin::DesktopScreenWin() { | 36 DesktopScreenWin::DesktopScreenWin() { |
37 } | 37 } |
38 | 38 |
39 DesktopScreenWin::~DesktopScreenWin() { | 39 DesktopScreenWin::~DesktopScreenWin() { |
40 } | 40 } |
41 | 41 |
42 //////////////////////////////////////////////////////////////////////////////// | 42 //////////////////////////////////////////////////////////////////////////////// |
43 // DesktopScreenWin, gfx::ScreenImpl implementation: | 43 // DesktopScreenWin, gfx::Screen implementation: |
| 44 |
| 45 bool DesktopScreenWin::IsDIPEnabled() { |
| 46 return true; |
| 47 } |
44 | 48 |
45 gfx::Point DesktopScreenWin::GetCursorScreenPoint() { | 49 gfx::Point DesktopScreenWin::GetCursorScreenPoint() { |
46 POINT pt; | 50 POINT pt; |
47 GetCursorPos(&pt); | 51 GetCursorPos(&pt); |
48 return gfx::Point(pt); | 52 return gfx::Point(pt); |
49 } | 53 } |
50 | 54 |
51 gfx::NativeWindow DesktopScreenWin::GetWindowAtCursorScreenPoint() { | 55 gfx::NativeWindow DesktopScreenWin::GetWindowAtCursorScreenPoint() { |
52 POINT location; | 56 POINT location; |
53 gfx::AcceleratedWidget accelerated_widget = | 57 gfx::AcceleratedWidget accelerated_widget = |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 MONITORINFO mi = GetMonitorInfoForMonitor( | 98 MONITORINFO mi = GetMonitorInfoForMonitor( |
95 MonitorFromWindow(NULL, MONITOR_DEFAULTTOPRIMARY)); | 99 MonitorFromWindow(NULL, MONITOR_DEFAULTTOPRIMARY)); |
96 gfx::Display display = GetDisplay(mi); | 100 gfx::Display display = GetDisplay(mi); |
97 DCHECK_EQ(GetSystemMetrics(SM_CXSCREEN), display.size().width()); | 101 DCHECK_EQ(GetSystemMetrics(SM_CXSCREEN), display.size().width()); |
98 DCHECK_EQ(GetSystemMetrics(SM_CYSCREEN), display.size().height()); | 102 DCHECK_EQ(GetSystemMetrics(SM_CYSCREEN), display.size().height()); |
99 return display; | 103 return display; |
100 } | 104 } |
101 | 105 |
102 //////////////////////////////////////////////////////////////////////////////// | 106 //////////////////////////////////////////////////////////////////////////////// |
103 | 107 |
104 gfx::ScreenImpl* CreateDesktopScreen() { | 108 gfx::Screen* CreateDesktopScreen() { |
105 return new DesktopScreenWin; | 109 return new DesktopScreenWin; |
106 } | 110 } |
107 | 111 |
108 } // namespace aura | 112 } // namespace aura |
OLD | NEW |