Browse Source

Remove ScopedComPtr and scoped_comptr.h

https://chromium-review.googlesource.com/726461
Aleksei Kuzmin 7 years ago
parent
commit
f6648a0d4d

+ 2 - 1
atom/browser/native_window_views.cc

@@ -6,6 +6,7 @@
 
 #if defined(OS_WIN)
 #include <objbase.h>
+#include <wrl/client.h>
 #endif
 
 #include <vector>
@@ -741,7 +742,7 @@ void NativeWindowViews::FlashFrame(bool flash) {
 
 void NativeWindowViews::SetSkipTaskbar(bool skip) {
 #if defined(OS_WIN)
-  base::win::ScopedComPtr<ITaskbarList> taskbar;
+  Microsoft::WRL::ComPtr<ITaskbarList> taskbar;
   if (FAILED(::CoCreateInstance(CLSID_TaskbarList, nullptr,
                                 CLSCTX_INPROC_SERVER,
                                 IID_PPV_ARGS(&taskbar))) ||

+ 2 - 2
atom/browser/ui/win/taskbar_host.h

@@ -6,6 +6,7 @@
 #define ATOM_BROWSER_UI_WIN_TASKBAR_HOST_H_
 
 #include <shobjidl.h>
+#include <wrl/client.h>
 
 #include <map>
 #include <string>
@@ -13,7 +14,6 @@
 
 #include "atom/browser/native_window.h"
 #include "base/callback.h"
-#include "base/win/scoped_comptr.h"
 #include "ui/gfx/geometry/rect.h"
 #include "ui/gfx/image/image.h"
 
@@ -66,7 +66,7 @@ class TaskbarHost {
   std::vector<ThumbarButton> last_buttons_;
 
   // The COM object of taskbar.
-  base::win::ScopedComPtr<ITaskbarList3> taskbar_;
+  Microsoft::WRL::ComPtr<ITaskbarList3> taskbar_;
 
   // Whether we have already added the buttons to thumbar.
   bool thumbar_buttons_added_ = false;

+ 5 - 5
atom/common/platform_util_win.cc

@@ -13,6 +13,7 @@
 #include <objbase.h>
 #include <shellapi.h>
 #include <shlobj.h>
+#include <wrl/client.h>
 
 #include "base/bind.h"
 #include "base/bind_helpers.h"
@@ -24,7 +25,6 @@
 #include "base/win/registry.h"
 #include "base/win/scoped_co_mem.h"
 #include "base/win/scoped_com_initializer.h"
-#include "base/win/scoped_comptr.h"
 #include "base/win/windows_version.h"
 #include "ui/base/win/shell.h"
 #include "url/gurl.h"
@@ -273,7 +273,7 @@ bool ShowItemInFolder(const base::FilePath& full_path) {
     return ui::win::OpenFolderViaShell(dir);
   }
 
-  base::win::ScopedComPtr<IShellFolder> desktop;
+  Microsoft::WRL::ComPtr<IShellFolder> desktop;
   HRESULT hr = SHGetDesktopFolder(desktop.GetAddressOf());
   if (FAILED(hr))
     return false;
@@ -357,7 +357,7 @@ bool MoveItemToTrash(const base::FilePath& path) {
   if (!com_initializer.succeeded())
     return false;
 
-  base::win::ScopedComPtr<IFileOperation> pfo;
+  Microsoft::WRL::ComPtr<IFileOperation> pfo;
   if (FAILED(::CoCreateInstance(CLSID_FileOperation, nullptr, CLSCTX_ALL,
                                 IID_PPV_ARGS(&pfo))))
     return false;
@@ -381,13 +381,13 @@ bool MoveItemToTrash(const base::FilePath& path) {
   }
 
   // Create an IShellItem from the supplied source path.
-  base::win::ScopedComPtr<IShellItem> delete_item;
+  Microsoft::WRL::ComPtr<IShellItem> delete_item;
   if (FAILED(SHCreateItemFromParsingName(
           path.value().c_str(), NULL,
           IID_PPV_ARGS(delete_item.GetAddressOf()))))
     return false;
 
-  base::win::ScopedComPtr<IFileOperationProgressSink> delete_sink(
+  Microsoft::WRL::ComPtr<IFileOperationProgressSink> delete_sink(
       new DeleteFileProgressSink);
   if (!delete_sink)
     return false;

+ 2 - 2
chromium_src/chrome/browser/speech/tts_win.cc

@@ -5,12 +5,12 @@
 #include <math.h>
 #include <objbase.h>
 #include <sapi.h>
+#include <wrl/client.h>
 
 #include "base/memory/singleton.h"
 #include "base/strings/string_number_conversions.h"
 #include "base/strings/utf_string_conversions.h"
 #include "base/values.h"
-#include "base/win/scoped_comptr.h"
 #include "chrome/browser/speech/tts_controller.h"
 #include "chrome/browser/speech/tts_platform.h"
 
@@ -45,7 +45,7 @@ class TtsPlatformImplWin : public TtsPlatformImpl {
 
   void OnSpeechEvent();
 
-  base::win::ScopedComPtr<ISpVoice> speech_synthesizer_;
+  Microsoft::WRL::ComPtr<ISpVoice> speech_synthesizer_;
 
   // These apply to the current utterance only.
   std::wstring utterance_;