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

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

Issue 672823002: Remove IsDIPEnabled from Screen (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dpi-cleanup-1
Patch Set: rebase Created 6 years, 2 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
« no previous file with comments | « ui/gfx/screen_win.h ('k') | ui/views/widget/desktop_aura/desktop_screen_win.h » ('j') | 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_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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 86
87 ScreenWin::ScreenWin() 87 ScreenWin::ScreenWin()
88 : displays_(GetDisplays()) { 88 : displays_(GetDisplays()) {
89 SingletonHwnd::GetInstance()->AddObserver(this); 89 SingletonHwnd::GetInstance()->AddObserver(this);
90 } 90 }
91 91
92 ScreenWin::~ScreenWin() { 92 ScreenWin::~ScreenWin() {
93 SingletonHwnd::GetInstance()->RemoveObserver(this); 93 SingletonHwnd::GetInstance()->RemoveObserver(this);
94 } 94 }
95 95
96 bool ScreenWin::IsDIPEnabled() {
97 return GetDPIScale() > 1.0;
98 }
99
100 gfx::Point ScreenWin::GetCursorScreenPoint() { 96 gfx::Point ScreenWin::GetCursorScreenPoint() {
101 POINT pt; 97 POINT pt;
102 GetCursorPos(&pt); 98 GetCursorPos(&pt);
103 gfx::Point cursor_pos_pixels(pt); 99 gfx::Point cursor_pos_pixels(pt);
104 return gfx::win::ScreenToDIPPoint(cursor_pos_pixels); 100 return gfx::win::ScreenToDIPPoint(cursor_pos_pixels);
105 } 101 }
106 102
107 gfx::NativeWindow ScreenWin::GetWindowUnderCursor() { 103 gfx::NativeWindow ScreenWin::GetWindowUnderCursor() {
108 POINT cursor_loc; 104 POINT cursor_loc;
109 HWND hwnd = GetCursorPos(&cursor_loc) ? WindowFromPoint(cursor_loc) : NULL; 105 HWND hwnd = GetCursorPos(&cursor_loc) ? WindowFromPoint(cursor_loc) : NULL;
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 NOTREACHED(); 192 NOTREACHED();
197 return NULL; 193 return NULL;
198 } 194 }
199 195
200 NativeWindow ScreenWin::GetNativeWindowFromHWND(HWND hwnd) const { 196 NativeWindow ScreenWin::GetNativeWindowFromHWND(HWND hwnd) const {
201 NOTREACHED(); 197 NOTREACHED();
202 return NULL; 198 return NULL;
203 } 199 }
204 200
205 } // namespace gfx 201 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/screen_win.h ('k') | ui/views/widget/desktop_aura/desktop_screen_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698