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

Unified Diff: chrome/browser/ui/views/frame/taskbar_decorator_win.cc

Issue 2894483002: Migrate from ScopedComPtr::CreateInstance() to CoCreateInstance in chrome/... (Closed)
Patch Set: Fix Header Include Location 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
Index: chrome/browser/ui/views/frame/taskbar_decorator_win.cc
diff --git a/chrome/browser/ui/views/frame/taskbar_decorator_win.cc b/chrome/browser/ui/views/frame/taskbar_decorator_win.cc
index 9c67b9c3547c7650ca34ac38a28134a1023939e8..5f99203a94d326e981e6e0cd87683dbe94757404 100644
--- a/chrome/browser/ui/views/frame/taskbar_decorator_win.cc
+++ b/chrome/browser/ui/views/frame/taskbar_decorator_win.cc
@@ -4,6 +4,7 @@
#include "chrome/browser/ui/views/frame/taskbar_decorator_win.h"
+#include <objbase.h>
#include <shobjidl.h>
#include "base/bind.h"
@@ -32,8 +33,8 @@ namespace {
// valid.
void SetOverlayIcon(HWND hwnd, std::unique_ptr<SkBitmap> bitmap) {
base::win::ScopedComPtr<ITaskbarList3> taskbar;
- HRESULT result = taskbar.CreateInstance(CLSID_TaskbarList, nullptr,
- CLSCTX_INPROC_SERVER);
+ HRESULT result = ::CoCreateInstance(
+ CLSID_TaskbarList, nullptr, CLSCTX_INPROC_SERVER, IID_PPV_ARGS(&taskbar));
if (FAILED(result) || FAILED(taskbar->HrInit()))
return;
« no previous file with comments | « chrome/browser/speech/tts_win.cc ('k') | chrome/browser/ui/views/status_icons/status_tray_state_changer_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698