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

Side by Side Diff: base/win/win_util.cc

Issue 2850683002: Remove ScopedComPtr::ReceiveVoid and Add ScopedComPtrRef (Closed)
Patch Set: Add Explicit Created 3 years, 7 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 | « base/win/scoped_comptr.h ('k') | chrome/browser/google/google_update_win.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 "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.
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 base::win::ScopedComPtr<IUIViewSettingsInterop> view_settings_interop; 132 base::win::ScopedComPtr<IUIViewSettingsInterop> view_settings_interop;
133 hr = get_factory(view_settings_guid, IID_PPV_ARGS(&view_settings_interop)); 133 hr = get_factory(view_settings_guid, IID_PPV_ARGS(&view_settings_interop));
134 if (FAILED(hr)) 134 if (FAILED(hr))
135 return false; 135 return false;
136 136
137 base::win::ScopedComPtr<ABI::Windows::UI::ViewManagement::IUIViewSettings> 137 base::win::ScopedComPtr<ABI::Windows::UI::ViewManagement::IUIViewSettings>
138 view_settings; 138 view_settings;
139 // TODO(ananta) 139 // TODO(ananta)
140 // 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
141 // intiating the request to display the keyboard. 141 // intiating the request to display the keyboard.
142 hr = view_settings_interop->GetForWindow( 142 hr = view_settings_interop->GetForWindow(hwnd, IID_PPV_ARGS(&view_settings));
143 hwnd,
144 __uuidof(ABI::Windows::UI::ViewManagement::IUIViewSettings),
145 view_settings.ReceiveVoid());
146 if (FAILED(hr)) 143 if (FAILED(hr))
147 return false; 144 return false;
148 145
149 ABI::Windows::UI::ViewManagement::UserInteractionMode mode = 146 ABI::Windows::UI::ViewManagement::UserInteractionMode mode =
150 ABI::Windows::UI::ViewManagement::UserInteractionMode_Mouse; 147 ABI::Windows::UI::ViewManagement::UserInteractionMode_Mouse;
151 view_settings->get_UserInteractionMode(&mode); 148 view_settings->get_UserInteractionMode(&mode);
152 return mode == ABI::Windows::UI::ViewManagement::UserInteractionMode_Touch; 149 return mode == ABI::Windows::UI::ViewManagement::UserInteractionMode_Touch;
153 } 150 }
154 151
155 // Returns true if a physical keyboard is detected on Windows 8 and up. 152 // Returns true if a physical keyboard is detected on Windows 8 and up.
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
638 awareness == PROCESS_PER_MONITOR_DPI_AWARE) 635 awareness == PROCESS_PER_MONITOR_DPI_AWARE)
639 per_monitor_dpi_aware = PerMonitorDpiAware::PER_MONITOR_DPI_AWARE; 636 per_monitor_dpi_aware = PerMonitorDpiAware::PER_MONITOR_DPI_AWARE;
640 } 637 }
641 } 638 }
642 } 639 }
643 return per_monitor_dpi_aware == PerMonitorDpiAware::PER_MONITOR_DPI_AWARE; 640 return per_monitor_dpi_aware == PerMonitorDpiAware::PER_MONITOR_DPI_AWARE;
644 } 641 }
645 642
646 } // namespace win 643 } // namespace win
647 } // namespace base 644 } // namespace base
OLDNEW
« no previous file with comments | « base/win/scoped_comptr.h ('k') | chrome/browser/google/google_update_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698