Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(204)

Side by Side Diff: ui/gfx/screen_win.cc

Issue 10389109: Add gfx::Screen::IsEnabled() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Decided that the original approach with gfx::Sceren::IsDIPEnabled is better than the ifdef Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/gfx/screen_mac.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ui/gfx/screen_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698