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

Unified Diff: ui/gfx/win/direct_manipulation.cc

Issue 2887243002: Remove ScopedComPtr::CreateInstance() (Closed)
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/host/setup/win/auth_code_getter.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/win/direct_manipulation.cc
diff --git a/ui/gfx/win/direct_manipulation.cc b/ui/gfx/win/direct_manipulation.cc
index ca778cb6415336d711268e235599326fe65f55f0..e180c0d351b5fa9223b676676b4f0c10b625bbbb 100644
--- a/ui/gfx/win/direct_manipulation.cc
+++ b/ui/gfx/win/direct_manipulation.cc
@@ -4,6 +4,8 @@
#include "ui/gfx/win/direct_manipulation.h"
+#include <objbase.h>
+
#include "base/win/windows_version.h"
namespace gfx {
@@ -32,12 +34,13 @@ void DirectManipulationHelper::Initialize(HWND window) {
// TODO(ananta)
// Remove the CHECK statements here and below and replace them with logs
// when this code stabilizes.
- HRESULT hr = manager_.CreateInstance(CLSID_DirectManipulationManager,
- nullptr, CLSCTX_INPROC_SERVER);
+ HRESULT hr =
+ ::CoCreateInstance(CLSID_DirectManipulationManager, nullptr,
+ CLSCTX_INPROC_SERVER, IID_PPV_ARGS(&manager_));
CHECK(SUCCEEDED(hr));
- hr = compositor_.CreateInstance(CLSID_DCompManipulationCompositor,
- nullptr, CLSCTX_INPROC_SERVER);
+ hr = ::CoCreateInstance(CLSID_DCompManipulationCompositor, nullptr,
+ CLSCTX_INPROC_SERVER, IID_PPV_ARGS(&compositor_));
CHECK(SUCCEEDED(hr));
hr = manager_->GetUpdateManager(IID_PPV_ARGS(update_manager_.GetAddressOf()));
« no previous file with comments | « remoting/host/setup/win/auth_code_getter.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698