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

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

Issue 672673005: Remove IsHighDPIEnabled, move EnableHighDPISupport to only place it's used (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dpi-cleanup-5
Patch Set: . 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/base/resource/resource_bundle_win.cc ('k') | ui/gfx/win/dpi.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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 &other_bounds_rect, MONITOR_DEFAULTTONEAREST)); 153 &other_bounds_rect, MONITOR_DEFAULTTONEAREST));
154 return GetDisplay(monitor_info); 154 return GetDisplay(monitor_info);
155 } 155 }
156 156
157 gfx::Display ScreenWin::GetPrimaryDisplay() const { 157 gfx::Display ScreenWin::GetPrimaryDisplay() const {
158 MONITORINFOEX mi = GetMonitorInfoForMonitor( 158 MONITORINFOEX mi = GetMonitorInfoForMonitor(
159 MonitorFromWindow(NULL, MONITOR_DEFAULTTOPRIMARY)); 159 MonitorFromWindow(NULL, MONITOR_DEFAULTTOPRIMARY));
160 gfx::Display display = GetDisplay(mi); 160 gfx::Display display = GetDisplay(mi);
161 // TODO(kevers|girard): Test if these checks can be reintroduced for high-DIP 161 // TODO(kevers|girard): Test if these checks can be reintroduced for high-DIP
162 // once more of the app is DIP-aware. 162 // once more of the app is DIP-aware.
163 if (!(GetDPIScale() > 1.0 || IsHighDPIEnabled())) { 163 if (!(GetDPIScale() > 1.0)) {
sky 2014/10/23 16:53:51 nit: GetDPIScale == 1.0
scottmg 2014/10/23 22:09:01 Done.
164 DCHECK_EQ(GetSystemMetrics(SM_CXSCREEN), display.size().width()); 164 DCHECK_EQ(GetSystemMetrics(SM_CXSCREEN), display.size().width());
165 DCHECK_EQ(GetSystemMetrics(SM_CYSCREEN), display.size().height()); 165 DCHECK_EQ(GetSystemMetrics(SM_CYSCREEN), display.size().height());
166 } 166 }
167 return display; 167 return display;
168 } 168 }
169 169
170 void ScreenWin::AddObserver(DisplayObserver* observer) { 170 void ScreenWin::AddObserver(DisplayObserver* observer) {
171 change_notifier_.AddObserver(observer); 171 change_notifier_.AddObserver(observer);
172 } 172 }
173 173
(...skipping 18 matching lines...) Expand all
192 NOTREACHED(); 192 NOTREACHED();
193 return NULL; 193 return NULL;
194 } 194 }
195 195
196 NativeWindow ScreenWin::GetNativeWindowFromHWND(HWND hwnd) const { 196 NativeWindow ScreenWin::GetNativeWindowFromHWND(HWND hwnd) const {
197 NOTREACHED(); 197 NOTREACHED();
198 return NULL; 198 return NULL;
199 } 199 }
200 200
201 } // namespace gfx 201 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/base/resource/resource_bundle_win.cc ('k') | ui/gfx/win/dpi.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698