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_win.h" | 5 #include "ui/gfx/screen_win.h" |
6 | 6 |
7 #include <windows.h> | 7 #include <windows.h> |
8 | 8 |
9 #include "base/hash.h" | 9 #include "base/hash.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 return GetPrimaryDisplay(); | 99 return GetPrimaryDisplay(); |
100 } | 100 } |
101 | 101 |
102 MONITORINFOEX monitor_info; | 102 MONITORINFOEX monitor_info; |
103 monitor_info.cbSize = sizeof(monitor_info); | 103 monitor_info.cbSize = sizeof(monitor_info); |
104 GetMonitorInfo(MonitorFromWindow(window_hwnd, MONITOR_DEFAULTTONEAREST), | 104 GetMonitorInfo(MonitorFromWindow(window_hwnd, MONITOR_DEFAULTTONEAREST), |
105 &monitor_info); | 105 &monitor_info); |
106 return GetDisplay(monitor_info); | 106 return GetDisplay(monitor_info); |
107 } | 107 } |
108 | 108 |
| 109 bool ScreenWin::GetDisplayColorProfile( |
| 110 gfx::NativeView view, std::vector<char>* color_profile) const { |
| 111 DCHECK(color_profile->empty()); |
| 112 |
| 113 HWND hwnd = GetHWNDFromNativeView(view); |
| 114 if (!hwnd) |
| 115 return false; |
| 116 |
| 117 // TODO(noel): implement. |
| 118 NOTIMPLEMENTED(); |
| 119 return false; |
| 120 } |
| 121 |
109 gfx::Display ScreenWin::GetDisplayNearestPoint(const gfx::Point& point) const { | 122 gfx::Display ScreenWin::GetDisplayNearestPoint(const gfx::Point& point) const { |
110 POINT initial_loc = { point.x(), point.y() }; | 123 POINT initial_loc = { point.x(), point.y() }; |
111 HMONITOR monitor = MonitorFromPoint(initial_loc, MONITOR_DEFAULTTONEAREST); | 124 HMONITOR monitor = MonitorFromPoint(initial_loc, MONITOR_DEFAULTTONEAREST); |
112 MONITORINFOEX mi; | 125 MONITORINFOEX mi; |
113 ZeroMemory(&mi, sizeof(MONITORINFOEX)); | 126 ZeroMemory(&mi, sizeof(MONITORINFOEX)); |
114 mi.cbSize = sizeof(mi); | 127 mi.cbSize = sizeof(mi); |
115 if (monitor && GetMonitorInfo(monitor, &mi)) { | 128 if (monitor && GetMonitorInfo(monitor, &mi)) { |
116 return GetDisplay(mi); | 129 return GetDisplay(mi); |
117 } | 130 } |
118 return gfx::Display(); | 131 return gfx::Display(); |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 NOTREACHED(); | 163 NOTREACHED(); |
151 return NULL; | 164 return NULL; |
152 } | 165 } |
153 | 166 |
154 NativeWindow ScreenWin::GetNativeWindowFromHWND(HWND hwnd) const { | 167 NativeWindow ScreenWin::GetNativeWindowFromHWND(HWND hwnd) const { |
155 NOTREACHED(); | 168 NOTREACHED(); |
156 return NULL; | 169 return NULL; |
157 } | 170 } |
158 | 171 |
159 } // namespace gfx | 172 } // namespace gfx |
OLD | NEW |