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

Side by Side Diff: ui/base/win/dpi.cc

Issue 11889017: some fixes and warning disables in ui/ for building on win x64 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove stupid code Created 7 years, 11 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/base/range/range_win.cc ('k') | ui/base/win/hwnd_subclass.cc » ('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/base/win/dpi.h" 5 #include "ui/base/win/dpi.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 8
9 #include "base/win/scoped_hdc.h" 9 #include "base/win/scoped_hdc.h"
10 10
(...skipping 29 matching lines...) Expand all
40 } 40 }
41 41
42 bool IsInHighDPIMode() { 42 bool IsInHighDPIMode() {
43 gfx::Size dpi(GetDPI()); 43 gfx::Size dpi(GetDPI());
44 return dpi.width() > kDefaultDPIX || dpi.height() > kDefaultDPIY; 44 return dpi.width() > kDefaultDPIX || dpi.height() > kDefaultDPIY;
45 } 45 }
46 46
47 void EnableHighDPISupport() { 47 void EnableHighDPISupport() {
48 typedef BOOL(WINAPI *SetProcessDPIAwarePtr)(VOID); 48 typedef BOOL(WINAPI *SetProcessDPIAwarePtr)(VOID);
49 SetProcessDPIAwarePtr set_process_dpi_aware_func = 49 SetProcessDPIAwarePtr set_process_dpi_aware_func =
50 GetProcAddress(GetModuleHandleA("user32.dll"), "SetProcessDPIAware"); 50 reinterpret_cast<SetProcessDPIAwarePtr>(
51 GetProcAddress(GetModuleHandleA("user32.dll"), "SetProcessDPIAware"));
51 if (set_process_dpi_aware_func) 52 if (set_process_dpi_aware_func)
52 set_process_dpi_aware_func(); 53 set_process_dpi_aware_func();
53 } 54 }
54 55
55 } // namespace ui 56 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/range/range_win.cc ('k') | ui/base/win/hwnd_subclass.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698