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 #include "base/win/win_util.h" | 5 #include "base/win/win_util.h" |
6 | 6 |
7 #include <aclapi.h> | 7 #include <aclapi.h> |
8 #include <cfgmgr32.h> | 8 #include <cfgmgr32.h> |
9 #include <powrprof.h> | 9 #include <powrprof.h> |
10 #include <shobjidl.h> // Must be before propkey. | 10 #include <shobjidl.h> // Must be before propkey. |
11 #include <initguid.h> | 11 #include <initguid.h> |
12 #include <inspectable.h> | 12 #include <inspectable.h> |
13 #include <mdmregistration.h> | 13 #include <mdmregistration.h> |
| 14 #include <objbase.h> |
14 #include <propkey.h> | 15 #include <propkey.h> |
15 #include <propvarutil.h> | 16 #include <propvarutil.h> |
16 #include <psapi.h> | 17 #include <psapi.h> |
17 #include <roapi.h> | 18 #include <roapi.h> |
18 #include <sddl.h> | 19 #include <sddl.h> |
19 #include <setupapi.h> | 20 #include <setupapi.h> |
20 #include <shellscalingapi.h> | 21 #include <shellscalingapi.h> |
21 #include <shlwapi.h> | 22 #include <shlwapi.h> |
22 #include <signal.h> | 23 #include <signal.h> |
23 #include <stddef.h> | 24 #include <stddef.h> |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 hr = create_string( | 123 hr = create_string( |
123 RuntimeClass_Windows_UI_ViewManagement_UIViewSettings, | 124 RuntimeClass_Windows_UI_ViewManagement_UIViewSettings, |
124 static_cast<UINT32>( | 125 static_cast<UINT32>( |
125 wcslen(RuntimeClass_Windows_UI_ViewManagement_UIViewSettings)), | 126 wcslen(RuntimeClass_Windows_UI_ViewManagement_UIViewSettings)), |
126 &view_settings_guid); | 127 &view_settings_guid); |
127 if (FAILED(hr)) | 128 if (FAILED(hr)) |
128 return false; | 129 return false; |
129 } | 130 } |
130 | 131 |
131 base::win::ScopedComPtr<IUIViewSettingsInterop> view_settings_interop; | 132 base::win::ScopedComPtr<IUIViewSettingsInterop> view_settings_interop; |
132 hr = get_factory(view_settings_guid, | 133 hr = get_factory(view_settings_guid, IID_PPV_ARGS(&view_settings_interop)); |
133 __uuidof(IUIViewSettingsInterop), | |
134 view_settings_interop.ReceiveVoid()); | |
135 if (FAILED(hr)) | 134 if (FAILED(hr)) |
136 return false; | 135 return false; |
137 | 136 |
138 base::win::ScopedComPtr<ABI::Windows::UI::ViewManagement::IUIViewSettings> | 137 base::win::ScopedComPtr<ABI::Windows::UI::ViewManagement::IUIViewSettings> |
139 view_settings; | 138 view_settings; |
140 // TODO(ananta) | 139 // TODO(ananta) |
141 // Avoid using GetForegroundWindow here and pass in the HWND of the window | 140 // Avoid using GetForegroundWindow here and pass in the HWND of the window |
142 // intiating the request to display the keyboard. | 141 // intiating the request to display the keyboard. |
143 hr = view_settings_interop->GetForWindow( | 142 hr = view_settings_interop->GetForWindow( |
144 hwnd, | 143 hwnd, |
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
639 awareness == PROCESS_PER_MONITOR_DPI_AWARE) | 638 awareness == PROCESS_PER_MONITOR_DPI_AWARE) |
640 per_monitor_dpi_aware = PerMonitorDpiAware::PER_MONITOR_DPI_AWARE; | 639 per_monitor_dpi_aware = PerMonitorDpiAware::PER_MONITOR_DPI_AWARE; |
641 } | 640 } |
642 } | 641 } |
643 } | 642 } |
644 return per_monitor_dpi_aware == PerMonitorDpiAware::PER_MONITOR_DPI_AWARE; | 643 return per_monitor_dpi_aware == PerMonitorDpiAware::PER_MONITOR_DPI_AWARE; |
645 } | 644 } |
646 | 645 |
647 } // namespace win | 646 } // namespace win |
648 } // namespace base | 647 } // namespace base |
OLD | NEW |