OLD | NEW |
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 // This file implements the Windows service controlling Me2Me host processes | 5 // This file implements the Windows service controlling Me2Me host processes |
6 // running within user sessions. | 6 // running within user sessions. |
7 | 7 |
8 #include "remoting/host/desktop_process_main.h" | 8 #include "remoting/host/desktop_process_main.h" |
9 | 9 |
10 #include "base/at_exit.h" | 10 #include "base/at_exit.h" |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 #if defined(OS_WIN) | 87 #if defined(OS_WIN) |
88 // Register and initialize common controls. | 88 // Register and initialize common controls. |
89 INITCOMMONCONTROLSEX info; | 89 INITCOMMONCONTROLSEX info; |
90 info.dwSize = sizeof(info); | 90 info.dwSize = sizeof(info); |
91 info.dwICC = ICC_STANDARD_CLASSES; | 91 info.dwICC = ICC_STANDARD_CLASSES; |
92 InitCommonControlsEx(&info); | 92 InitCommonControlsEx(&info); |
93 | 93 |
94 // Mark the process as DPI-aware, so Windows won't scale coordinates in APIs. | 94 // Mark the process as DPI-aware, so Windows won't scale coordinates in APIs. |
95 // N.B. This API exists on Vista and above. | 95 // N.B. This API exists on Vista and above. |
96 if (base::win::GetVersion() >= base::win::VERSION_VISTA) { | 96 if (base::win::GetVersion() >= base::win::VERSION_VISTA) { |
97 FilePath path(base::GetNativeLibraryName(UTF8ToUTF16("user32"))); | 97 base::FilePath path(base::GetNativeLibraryName(UTF8ToUTF16("user32"))); |
98 base::ScopedNativeLibrary user32(path); | 98 base::ScopedNativeLibrary user32(path); |
99 CHECK(user32.is_valid()); | 99 CHECK(user32.is_valid()); |
100 | 100 |
101 typedef BOOL (WINAPI * SetProcessDPIAwareFn)(); | 101 typedef BOOL (WINAPI * SetProcessDPIAwareFn)(); |
102 SetProcessDPIAwareFn set_process_dpi_aware = | 102 SetProcessDPIAwareFn set_process_dpi_aware = |
103 static_cast<SetProcessDPIAwareFn>( | 103 static_cast<SetProcessDPIAwareFn>( |
104 user32.GetFunctionPointer("SetProcessDPIAware")); | 104 user32.GetFunctionPointer("SetProcessDPIAware")); |
105 set_process_dpi_aware(); | 105 set_process_dpi_aware(); |
106 } | 106 } |
107 #endif // defined(OS_WIN) | 107 #endif // defined(OS_WIN) |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 return kSuccessExitCode; | 151 return kSuccessExitCode; |
152 } | 152 } |
153 | 153 |
154 } // namespace remoting | 154 } // namespace remoting |
155 | 155 |
156 #if !defined(OS_WIN) | 156 #if !defined(OS_WIN) |
157 int main(int argc, char** argv) { | 157 int main(int argc, char** argv) { |
158 return remoting::DesktopProcessMain(argc, argv); | 158 return remoting::DesktopProcessMain(argc, argv); |
159 } | 159 } |
160 #endif // !defined(OS_WIN) | 160 #endif // !defined(OS_WIN) |
OLD | NEW |