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

Side by Side Diff: chrome/app/chrome_exe_main_win.cc

Issue 691903002: Fix return type of SetProcessDpiAwareness aka SetProcessDpiAwarenessInternal (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 | « no previous file | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <windows.h> 5 #include <windows.h>
6 #include <tchar.h> 6 #include <tchar.h>
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/at_exit.h" 10 #include "base/at_exit.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 88
89 typedef enum MONITOR_DPI_TYPE { 89 typedef enum MONITOR_DPI_TYPE {
90 MDT_EFFECTIVE_DPI = 0, 90 MDT_EFFECTIVE_DPI = 0,
91 MDT_ANGULAR_DPI = 1, 91 MDT_ANGULAR_DPI = 1,
92 MDT_RAW_DPI = 2, 92 MDT_RAW_DPI = 2,
93 MDT_DEFAULT = MDT_EFFECTIVE_DPI 93 MDT_DEFAULT = MDT_EFFECTIVE_DPI
94 } MONITOR_DPI_TYPE; 94 } MONITOR_DPI_TYPE;
95 95
96 // Win8.1 supports monitor-specific DPI scaling. 96 // Win8.1 supports monitor-specific DPI scaling.
97 bool SetProcessDpiAwarenessWrapper(PROCESS_DPI_AWARENESS value) { 97 bool SetProcessDpiAwarenessWrapper(PROCESS_DPI_AWARENESS value) {
98 typedef BOOL(WINAPI *SetProcessDpiAwarenessPtr)(PROCESS_DPI_AWARENESS); 98 typedef HRESULT(WINAPI *SetProcessDpiAwarenessPtr)(PROCESS_DPI_AWARENESS);
99 SetProcessDpiAwarenessPtr set_process_dpi_awareness_func = 99 SetProcessDpiAwarenessPtr set_process_dpi_awareness_func =
100 reinterpret_cast<SetProcessDpiAwarenessPtr>( 100 reinterpret_cast<SetProcessDpiAwarenessPtr>(
101 GetProcAddress(GetModuleHandleA("user32.dll"), 101 GetProcAddress(GetModuleHandleA("user32.dll"),
102 "SetProcessDpiAwarenessInternal")); 102 "SetProcessDpiAwarenessInternal"));
103 if (set_process_dpi_awareness_func) { 103 if (set_process_dpi_awareness_func) {
104 HRESULT hr = set_process_dpi_awareness_func(value); 104 HRESULT hr = set_process_dpi_awareness_func(value);
105 if (SUCCEEDED(hr)) { 105 if (SUCCEEDED(hr)) {
106 VLOG(1) << "SetProcessDpiAwareness succeeded."; 106 VLOG(1) << "SetProcessDpiAwareness succeeded.";
107 return true; 107 return true;
108 } else if (hr == E_ACCESSDENIED) { 108 } else if (hr == E_ACCESSDENIED) {
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 163
164 CheckSafeModeLaunch(); 164 CheckSafeModeLaunch();
165 165
166 // Load and launch the chrome dll. *Everything* happens inside. 166 // Load and launch the chrome dll. *Everything* happens inside.
167 MainDllLoader* loader = MakeMainDllLoader(); 167 MainDllLoader* loader = MakeMainDllLoader();
168 int rc = loader->Launch(instance); 168 int rc = loader->Launch(instance);
169 loader->RelaunchChromeBrowserWithNewCommandLineIfNeeded(); 169 loader->RelaunchChromeBrowserWithNewCommandLineIfNeeded();
170 delete loader; 170 delete loader;
171 return rc; 171 return rc;
172 } 172 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698