summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-12 20:53:23 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-12 20:53:23 +0000
commit8ee65baac4ab9e3beb67674adbc6a210e2708604 (patch)
tree44400d118d7813a8d7e16a67f074c6696f8868b3
parentf1094b0275c82ead4b9aabbda24f5c2b3e8b4a1b (diff)
downloadchromium_src-8ee65baac4ab9e3beb67674adbc6a210e2708604.zip
chromium_src-8ee65baac4ab9e3beb67674adbc6a210e2708604.tar.gz
chromium_src-8ee65baac4ab9e3beb67674adbc6a210e2708604.tar.bz2
Include base/win/scoped_comptr.h instead of base/scoped_comptr_win.h.
Fix up all the callers to use the new location and namespace. Also, delete the stub file since it isn't included by anyone more. (Note: This was a TODO for brettw). BUG=None TEST=None R=brettw@chromium.org Review URL: http://codereview.chromium.org/6825055 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81303 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--base/scoped_comptr_win.h9
-rw-r--r--chrome/browser/accessibility/accessibility_win_browsertest.cc52
-rw-r--r--chrome/browser/accessibility/browser_accessibility_manager_win.h6
-rw-r--r--chrome/browser/accessibility/browser_accessibility_win_unittest.cc6
-rw-r--r--chrome/browser/accessibility/browser_views_accessibility_browsertest.cc4
-rw-r--r--chrome/browser/aeropeek_manager.cc8
-rw-r--r--chrome/browser/autocomplete/autocomplete_accessibility.h6
-rw-r--r--chrome/browser/autocomplete/autocomplete_edit_view_win.cc8
-rw-r--r--chrome/browser/autocomplete/autocomplete_edit_view_win.h4
-rw-r--r--chrome/browser/extensions/extension_tts_api_win.cc4
-rw-r--r--chrome/browser/first_run/first_run_win.cc4
-rw-r--r--chrome/browser/google/google_update.cc10
-rw-r--r--chrome/browser/history/history_publisher.h5
-rw-r--r--chrome/browser/history/history_publisher_win.cc18
-rw-r--r--chrome/browser/jumplist_win.cc26
-rw-r--r--chrome/browser/platform_util_win.cc8
-rw-r--r--chrome/browser/renderer_host/render_widget_host_view_win.cc4
-rw-r--r--chrome/browser/renderer_host/render_widget_host_view_win.h2
-rw-r--r--chrome/browser/shell_integration_win.cc10
-rw-r--r--chrome/browser/ui/views/shell_dialogs_win.cc4
-rw-r--r--chrome/common/win_safe_util.cc6
-rw-r--r--chrome/installer/util/shell_util_unittest.cc6
-rw-r--r--chrome/service/cloud_print/print_system_win.cc17
-rw-r--r--chrome_frame/bho.cc32
-rw-r--r--chrome_frame/bho.h2
-rw-r--r--chrome_frame/bind_context_info.cc6
-rw-r--r--chrome_frame/bind_context_info.h6
-rw-r--r--chrome_frame/bind_status_callback_impl.cc14
-rw-r--r--chrome_frame/bind_status_callback_impl.h8
-rw-r--r--chrome_frame/buggy_bho_handling.cc12
-rw-r--r--chrome_frame/chrome_active_document.cc54
-rw-r--r--chrome_frame/chrome_active_document.h6
-rw-r--r--chrome_frame/chrome_frame_activex.cc42
-rw-r--r--chrome_frame/chrome_frame_automation.h4
-rw-r--r--chrome_frame/com_message_event.cc8
-rw-r--r--chrome_frame/com_message_event.h7
-rw-r--r--chrome_frame/com_type_info_holder.cc4
-rw-r--r--chrome_frame/com_type_info_holder.h12
-rw-r--r--chrome_frame/external_tab.h6
-rw-r--r--chrome_frame/http_negotiate.cc8
-rw-r--r--chrome_frame/http_negotiate.h2
-rw-r--r--chrome_frame/in_place_menu.h10
-rw-r--r--chrome_frame/plugin_url_request.h4
-rw-r--r--chrome_frame/protocol_sink_wrap.cc49
-rw-r--r--chrome_frame/stream_impl.h6
-rw-r--r--chrome_frame/test/chrome_frame_test_utils.cc10
-rw-r--r--chrome_frame/test/chrome_frame_test_utils.h8
-rw-r--r--chrome_frame/test/chrome_frame_ui_test_utils.cc18
-rw-r--r--chrome_frame/test/chrome_frame_ui_test_utils.h4
-rw-r--r--chrome_frame/test/com_message_event_unittest.cc14
-rw-r--r--chrome_frame/test/ie_event_sink.cc28
-rw-r--r--chrome_frame/test/ie_event_sink.h8
-rw-r--r--chrome_frame/test/mock_ie_event_sink_actions.h4
-rw-r--r--chrome_frame/test/mock_ie_event_sink_test.cc8
-rw-r--r--chrome_frame/test/mock_ie_event_sink_test.h4
-rw-r--r--chrome_frame/test/navigation_test.cc6
-rw-r--r--chrome_frame/test/net/fake_external_tab.cc6
-rw-r--r--chrome_frame/test/perf/silverlight.cc10
-rw-r--r--chrome_frame/test/reliability/page_load_test.cc4
-rw-r--r--chrome_frame/test/urlmon_moniker_integration_test.cc18
-rw-r--r--chrome_frame/test/urlmon_moniker_unittest.cc14
-rw-r--r--chrome_frame/urlmon_bind_status_callback.cc4
-rw-r--r--chrome_frame/urlmon_bind_status_callback.h2
-rw-r--r--chrome_frame/urlmon_moniker.cc26
-rw-r--r--chrome_frame/urlmon_upload_data_stream_unittest.cc12
-rw-r--r--chrome_frame/urlmon_url_request.cc22
-rw-r--r--chrome_frame/urlmon_url_request_private.h10
-rw-r--r--chrome_frame/utils.cc27
-rw-r--r--content/common/gpu/media/mft_angle_video_device.h4
-rw-r--r--media/tools/mfdecoder/main.cc20
-rw-r--r--media/tools/mfdecoder/mfdecoder.cc18
-rw-r--r--media/video/mft_h264_decode_engine.cc26
-rw-r--r--media/video/mft_h264_decode_engine.h7
-rw-r--r--net/http/url_security_manager_win.cc6
-rw-r--r--printing/backend/print_backend_win.cc9
-rw-r--r--ui/base/dragdrop/os_exchange_data_provider_win.h6
-rw-r--r--ui/base/dragdrop/os_exchange_data_win_unittest.cc16
-rw-r--r--ui/gfx/canvas_direct2d.cc16
-rw-r--r--ui/gfx/canvas_direct2d.h6
-rw-r--r--ui/gfx/canvas_direct2d_unittest.cc2
80 files changed, 464 insertions, 468 deletions
diff --git a/base/scoped_comptr_win.h b/base/scoped_comptr_win.h
deleted file mode 100644
index 7f15885..0000000
--- a/base/scoped_comptr_win.h
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// TODO(brettw) remove this file when all callers are converted to using the
-// new location/namespace
-#include "base/win/scoped_comptr.h"
-
-using base::win::ScopedComPtr;
diff --git a/chrome/browser/accessibility/accessibility_win_browsertest.cc b/chrome/browser/accessibility/accessibility_win_browsertest.cc
index 85ae05a..19c30f1 100644
--- a/chrome/browser/accessibility/accessibility_win_browsertest.cc
+++ b/chrome/browser/accessibility/accessibility_win_browsertest.cc
@@ -5,7 +5,7 @@
#include <atlbase.h>
#include <vector>
-#include "base/scoped_comptr_win.h"
+#include "base/win/scoped_comptr.h"
#include "chrome/browser/automation/ui_controls.h"
#include "chrome/browser/renderer_host/render_widget_host_view_win.h"
#include "chrome/browser/ui/browser.h"
@@ -125,7 +125,7 @@ IAccessible* GetAccessibleFromResultVariant(IAccessible* parent, VARIANT *var) {
HRESULT QueryIAccessible2(IAccessible* accessible, IAccessible2** accessible2) {
// TODO(ctguil): For some reason querying the IAccessible2 interface from
// IAccessible fails.
- ScopedComPtr<IServiceProvider> service_provider;
+ base::win::ScopedComPtr<IServiceProvider> service_provider;
HRESULT hr = accessible->QueryInterface(service_provider.Receive());
if (FAILED(hr))
return hr;
@@ -139,8 +139,8 @@ HRESULT QueryIAccessible2(IAccessible* accessible, IAccessible2** accessible2) {
// IAccessible2::get_unique_id which is only supported by the child node.
void AccessibleContainsAccessible(
IAccessible* parent, IAccessible2* child, bool* result) {
- vector<ScopedComPtr<IAccessible>> accessible_list;
- accessible_list.push_back(ScopedComPtr<IAccessible>(parent));
+ vector<base::win::ScopedComPtr<IAccessible>> accessible_list;
+ accessible_list.push_back(base::win::ScopedComPtr<IAccessible>(parent));
LONG unique_id;
HRESULT hr = child->get_uniqueID(&unique_id);
@@ -148,10 +148,10 @@ void AccessibleContainsAccessible(
*result = false;
while (accessible_list.size()) {
- ScopedComPtr<IAccessible> accessible = accessible_list.back();
+ base::win::ScopedComPtr<IAccessible> accessible = accessible_list.back();
accessible_list.pop_back();
- ScopedComPtr<IAccessible2> accessible2;
+ base::win::ScopedComPtr<IAccessible2> accessible2;
hr = QueryIAccessible2(accessible, accessible2.Receive());
if (SUCCEEDED(hr)) {
LONG child_id;
@@ -176,10 +176,12 @@ void AccessibleContainsAccessible(
ASSERT_EQ(child_count, obtained_count);
for (int index = 0; index < obtained_count; index++) {
- ScopedComPtr<IAccessible> child_accessible(
+ base::win::ScopedComPtr<IAccessible> child_accessible(
GetAccessibleFromResultVariant(accessible, &child_array.get()[index]));
- if (child_accessible.get())
- accessible_list.push_back(ScopedComPtr<IAccessible>(child_accessible));
+ if (child_accessible.get()) {
+ accessible_list.push_back(
+ base::win::ScopedComPtr<IAccessible>(child_accessible));
+ }
}
}
}
@@ -314,7 +316,7 @@ void AccessibleChecker::CheckAccessibleChildren(IAccessible* parent) {
for (AccessibleCheckerVector::iterator child_checker = children_.begin();
child_checker != children_.end();
++child_checker, ++child) {
- ScopedComPtr<IAccessible> child_accessible;
+ base::win::ScopedComPtr<IAccessible> child_accessible;
child_accessible.Attach(GetAccessibleFromResultVariant(parent, child));
ASSERT_TRUE(child_accessible.get());
(*child_checker)->CheckAccessible(child_accessible);
@@ -358,9 +360,10 @@ IN_PROC_BROWSER_TEST_F(AccessibilityWinBrowserTest,
document2_checker.CheckAccessible(GetRendererAccessible());
// Check that document accessible has a parent accessible.
- ScopedComPtr<IAccessible> document_accessible(GetRendererAccessible());
+ base::win::ScopedComPtr<IAccessible> document_accessible(
+ GetRendererAccessible());
ASSERT_NE(document_accessible.get(), reinterpret_cast<IAccessible*>(NULL));
- ScopedComPtr<IDispatch> parent_dispatch;
+ base::win::ScopedComPtr<IDispatch> parent_dispatch;
HRESULT hr = document_accessible->get_accParent(parent_dispatch.Receive());
EXPECT_EQ(S_OK, hr);
EXPECT_NE(parent_dispatch, reinterpret_cast<IDispatch*>(NULL));
@@ -539,7 +542,8 @@ IN_PROC_BROWSER_TEST_F(AccessibilityWinBrowserTest,
document_checker.CheckAccessible(GetRendererAccessible());
// Focus the document accessible. This will un-focus the current node.
- ScopedComPtr<IAccessible> document_accessible(GetRendererAccessible());
+ base::win::ScopedComPtr<IAccessible> document_accessible(
+ GetRendererAccessible());
ASSERT_NE(document_accessible.get(), reinterpret_cast<IAccessible*>(NULL));
HRESULT hr = document_accessible->accSelect(
SELFLAG_TAKEFOCUS, CreateI4Variant(CHILDID_SELF));
@@ -599,7 +603,7 @@ IN_PROC_BROWSER_TEST_F(AccessibilityWinBrowserTest,
// Get the accessibility object for the browser window.
HWND browser_hwnd = browser()->window()->GetNativeHandle();
- ScopedComPtr<IAccessible> browser_accessible;
+ base::win::ScopedComPtr<IAccessible> browser_accessible;
HRESULT hr = AccessibleObjectFromWindow(
browser_hwnd,
OBJID_WINDOW,
@@ -608,9 +612,10 @@ IN_PROC_BROWSER_TEST_F(AccessibilityWinBrowserTest,
ASSERT_EQ(S_OK, hr);
// Get the accessibility object for the renderer client document.
- ScopedComPtr<IAccessible> document_accessible(GetRendererAccessible());
+ base::win::ScopedComPtr<IAccessible> document_accessible(
+ GetRendererAccessible());
ASSERT_NE(document_accessible.get(), reinterpret_cast<IAccessible*>(NULL));
- ScopedComPtr<IAccessible2> document_accessible2;
+ base::win::ScopedComPtr<IAccessible2> document_accessible2;
hr = QueryIAccessible2(document_accessible, document_accessible2.Receive());
ASSERT_EQ(S_OK, hr);
@@ -618,9 +623,9 @@ IN_PROC_BROWSER_TEST_F(AccessibilityWinBrowserTest,
// seem to work for here. Perhaps make IAccessible2 available in views to make
// unique id comparison available.
bool found = false;
- ScopedComPtr<IAccessible> parent = document_accessible;
+ base::win::ScopedComPtr<IAccessible> parent = document_accessible;
while (parent.get()) {
- ScopedComPtr<IDispatch> parent_dispatch;
+ base::win::ScopedComPtr<IDispatch> parent_dispatch;
hr = parent->get_accParent(parent_dispatch.Receive());
ASSERT_TRUE(SUCCEEDED(hr));
if (!parent_dispatch.get()) {
@@ -657,17 +662,18 @@ IN_PROC_BROWSER_TEST_F(AccessibilityWinBrowserTest,
NotificationType::RENDER_VIEW_HOST_ACCESSIBILITY_TREE_UPDATED);
// Get the IAccessible object for the document.
- ScopedComPtr<IAccessible> document_accessible(GetRendererAccessible());
+ base::win::ScopedComPtr<IAccessible> document_accessible(
+ GetRendererAccessible());
ASSERT_NE(document_accessible.get(), reinterpret_cast<IAccessible*>(NULL));
// Get the ISimpleDOM object for the document.
- ScopedComPtr<IServiceProvider> service_provider;
+ base::win::ScopedComPtr<IServiceProvider> service_provider;
HRESULT hr = static_cast<IAccessible*>(document_accessible)->QueryInterface(
service_provider.Receive());
ASSERT_EQ(S_OK, hr);
const GUID refguid = {0x0c539790, 0x12e4, 0x11cf,
0xb6, 0x61, 0x00, 0xaa, 0x00, 0x4c, 0xd6, 0xd8};
- ScopedComPtr<ISimpleDOMNode> document_isimpledomnode;
+ base::win::ScopedComPtr<ISimpleDOMNode> document_isimpledomnode;
hr = static_cast<IServiceProvider *>(service_provider)->QueryService(
refguid, IID_ISimpleDOMNode,
reinterpret_cast<void**>(document_isimpledomnode.Receive()));
@@ -686,7 +692,7 @@ IN_PROC_BROWSER_TEST_F(AccessibilityWinBrowserTest,
EXPECT_EQ(NODETYPE_DOCUMENT, node_type);
EXPECT_EQ(1, num_children);
- ScopedComPtr<ISimpleDOMNode> body_isimpledomnode;
+ base::win::ScopedComPtr<ISimpleDOMNode> body_isimpledomnode;
hr = document_isimpledomnode->get_firstChild(
body_isimpledomnode.Receive());
ASSERT_EQ(S_OK, hr);
@@ -698,7 +704,7 @@ IN_PROC_BROWSER_TEST_F(AccessibilityWinBrowserTest,
EXPECT_EQ(NODETYPE_ELEMENT, node_type);
EXPECT_EQ(1, num_children);
- ScopedComPtr<ISimpleDOMNode> checkbox_isimpledomnode;
+ base::win::ScopedComPtr<ISimpleDOMNode> checkbox_isimpledomnode;
hr = body_isimpledomnode->get_firstChild(
checkbox_isimpledomnode.Receive());
ASSERT_EQ(S_OK, hr);
diff --git a/chrome/browser/accessibility/browser_accessibility_manager_win.h b/chrome/browser/accessibility/browser_accessibility_manager_win.h
index 8226e5e..59af0a2 100644
--- a/chrome/browser/accessibility/browser_accessibility_manager_win.h
+++ b/chrome/browser/accessibility/browser_accessibility_manager_win.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -8,7 +8,7 @@
#include <oleacc.h>
-#include "base/scoped_comptr_win.h"
+#include "base/win/scoped_comptr.h"
#include "chrome/browser/accessibility/browser_accessibility_manager.h"
#include "webkit/glue/webaccessibility.h"
@@ -37,7 +37,7 @@ class BrowserAccessibilityManagerWin : public BrowserAccessibilityManager {
BrowserAccessibilityFactory* factory);
// A default IAccessible instance for the parent window.
- ScopedComPtr<IAccessible> window_iaccessible_;
+ base::win::ScopedComPtr<IAccessible> window_iaccessible_;
// Give BrowserAccessibilityManager::Create access to our constructor.
friend class BrowserAccessibilityManager;
diff --git a/chrome/browser/accessibility/browser_accessibility_win_unittest.cc b/chrome/browser/accessibility/browser_accessibility_win_unittest.cc
index c4a9a77..4875130 100644
--- a/chrome/browser/accessibility/browser_accessibility_win_unittest.cc
+++ b/chrome/browser/accessibility/browser_accessibility_win_unittest.cc
@@ -3,7 +3,7 @@
// found in the LICENSE file.
#include "base/memory/scoped_ptr.h"
-#include "base/scoped_comptr_win.h"
+#include "base/win/scoped_comptr.h"
#include "chrome/browser/accessibility/browser_accessibility_manager.h"
#include "chrome/browser/accessibility/browser_accessibility_win.h"
#include "content/common/view_messages.h"
@@ -172,12 +172,12 @@ TEST_F(BrowserAccessibilityTest, TestChildrenChange) {
// Query for the text IAccessible and verify that it returns "old text" as its
// value.
- ScopedComPtr<IDispatch> text_dispatch;
+ base::win::ScopedComPtr<IDispatch> text_dispatch;
HRESULT hr = manager->GetRoot()->toBrowserAccessibilityWin()->get_accChild(
CreateI4Variant(1), text_dispatch.Receive());
ASSERT_EQ(S_OK, hr);
- ScopedComPtr<IAccessible> text_accessible;
+ base::win::ScopedComPtr<IAccessible> text_accessible;
hr = text_dispatch.QueryInterface(text_accessible.Receive());
ASSERT_EQ(S_OK, hr);
diff --git a/chrome/browser/accessibility/browser_views_accessibility_browsertest.cc b/chrome/browser/accessibility/browser_views_accessibility_browsertest.cc
index f186ed9..d3d29de3 100644
--- a/chrome/browser/accessibility/browser_views_accessibility_browsertest.cc
+++ b/chrome/browser/accessibility/browser_views_accessibility_browsertest.cc
@@ -4,8 +4,8 @@
#include <oleacc.h>
-#include "base/scoped_comptr_win.h"
#include "base/utf_string_conversions.h"
+#include "base/win/scoped_comptr.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/view_ids.h"
@@ -127,7 +127,7 @@ IN_PROC_BROWSER_TEST_F(BrowserViewsAccessibilityTest,
ASSERT_TRUE(NULL != hwnd);
// Get accessibility object.
- ScopedComPtr<IAccessible> acc_obj;
+ base::win::ScopedComPtr<IAccessible> acc_obj;
HRESULT hr = ::AccessibleObjectFromWindow(hwnd, OBJID_WINDOW, IID_IAccessible,
reinterpret_cast<void**>(&acc_obj));
ASSERT_EQ(S_OK, hr);
diff --git a/chrome/browser/aeropeek_manager.cc b/chrome/browser/aeropeek_manager.cc
index 12e2c9c..7c1d3d5 100644
--- a/chrome/browser/aeropeek_manager.cc
+++ b/chrome/browser/aeropeek_manager.cc
@@ -10,8 +10,8 @@
#include "app/win/shell.h"
#include "base/command_line.h"
#include "base/memory/scoped_native_library.h"
-#include "base/scoped_comptr_win.h"
#include "base/synchronization/waitable_event.h"
+#include "base/win/scoped_comptr.h"
#include "base/win/scoped_gdi_object.h"
#include "base/win/scoped_hdc.h"
#include "base/win/windows_version.h"
@@ -263,7 +263,7 @@ class RegisterThumbnailTask : public Task {
// taskbar. But it seems to be OK to register it without checking the
// message.
// TODO(hbono): we need to check this registered message?
- ScopedComPtr<ITaskbarList3> taskbar;
+ base::win::ScopedComPtr<ITaskbarList3> taskbar;
if (FAILED(taskbar.CreateInstance(CLSID_TaskbarList, NULL,
CLSCTX_INPROC_SERVER)) ||
FAILED(taskbar->HrInit()) ||
@@ -731,7 +731,7 @@ void AeroPeekWindow::Activate() {
}
// Notify Windows to set the thumbnail focus to this window.
- ScopedComPtr<ITaskbarList3> taskbar;
+ base::win::ScopedComPtr<ITaskbarList3> taskbar;
HRESULT result = taskbar.CreateInstance(CLSID_TaskbarList, NULL,
CLSCTX_INPROC_SERVER);
if (FAILED(result)) {
@@ -785,7 +785,7 @@ void AeroPeekWindow::Destroy() {
return;
// Remove this window from the tab list of Windows.
- ScopedComPtr<ITaskbarList3> taskbar;
+ base::win::ScopedComPtr<ITaskbarList3> taskbar;
HRESULT result = taskbar.CreateInstance(CLSID_TaskbarList, NULL,
CLSCTX_INPROC_SERVER);
if (FAILED(result))
diff --git a/chrome/browser/autocomplete/autocomplete_accessibility.h b/chrome/browser/autocomplete/autocomplete_accessibility.h
index 27bd356..d74aef2 100644
--- a/chrome/browser/autocomplete/autocomplete_accessibility.h
+++ b/chrome/browser/autocomplete/autocomplete_accessibility.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -11,7 +11,7 @@
#include <oleacc.h>
#include "base/basictypes.h"
-#include "base/scoped_comptr_win.h"
+#include "base/win/scoped_comptr.h"
class AutocompleteEditViewWin;
@@ -105,7 +105,7 @@ class ATL_NO_VTABLE AutocompleteAccessibility
// A pointer containing the Windows' default IAccessible implementation for
// this object. Used where it is acceptable to return default MSAA
// information.
- ScopedComPtr<IAccessible> default_accessibility_server_;
+ base::win::ScopedComPtr<IAccessible> default_accessibility_server_;
private:
const AutocompleteEditViewWin* edit_box_;
diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_win.cc b/chrome/browser/autocomplete/autocomplete_edit_view_win.cc
index f529b70..8844732 100644
--- a/chrome/browser/autocomplete/autocomplete_edit_view_win.cc
+++ b/chrome/browser/autocomplete/autocomplete_edit_view_win.cc
@@ -750,7 +750,7 @@ IAccessible* AutocompleteEditViewWin::GetIAccessible() {
return NULL;
// Wrap the created object in a smart pointer so it won't leak.
- ScopedComPtr<IAccessible> accessibility_comptr(accessibility);
+ base::win::ScopedComPtr<IAccessible> accessibility_comptr(accessibility);
if (!SUCCEEDED(accessibility->Initialize(this)))
return NULL;
@@ -2075,7 +2075,7 @@ void AutocompleteEditViewWin::GetSelection(CHARRANGE& sel) const {
ITextDocument* const text_object_model = GetTextObjectModel();
if (!text_object_model)
return;
- ScopedComPtr<ITextSelection> selection;
+ base::win::ScopedComPtr<ITextSelection> selection;
const HRESULT hr = text_object_model->GetSelection(selection.Receive());
DCHECK_EQ(S_OK, hr);
long flags;
@@ -2105,7 +2105,7 @@ void AutocompleteEditViewWin::SetSelection(LONG start, LONG end) {
ITextDocument* const text_object_model = GetTextObjectModel();
if (!text_object_model)
return;
- ScopedComPtr<ITextSelection> selection;
+ base::win::ScopedComPtr<ITextSelection> selection;
const HRESULT hr = text_object_model->GetSelection(selection.Receive());
DCHECK_EQ(S_OK, hr);
selection->SetFlags(tomSelStartActive);
@@ -2416,7 +2416,7 @@ ITextDocument* AutocompleteEditViewWin::GetTextObjectModel() const {
if (!text_object_model_) {
// This is lazily initialized, instead of being initialized in the
// constructor, in order to avoid hurting startup performance.
- ScopedComPtr<IRichEditOle, NULL> ole_interface;
+ base::win::ScopedComPtr<IRichEditOle, NULL> ole_interface;
ole_interface.Attach(GetOleInterface());
if (ole_interface) {
ole_interface.QueryInterface(
diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_win.h b/chrome/browser/autocomplete/autocomplete_edit_view_win.h
index 2457369..fc8c9c9 100644
--- a/chrome/browser/autocomplete/autocomplete_edit_view_win.h
+++ b/chrome/browser/autocomplete/autocomplete_edit_view_win.h
@@ -14,7 +14,7 @@
#include <tom.h> // For ITextDocument, a COM interface to CRichEditCtrl.
#include "base/memory/scoped_ptr.h"
-#include "base/scoped_comptr_win.h"
+#include "base/win/scoped_comptr.h"
#include "chrome/browser/autocomplete/autocomplete.h"
#include "chrome/browser/autocomplete/autocomplete_edit_view.h"
#include "chrome/browser/ui/toolbar/toolbar_model.h"
@@ -539,7 +539,7 @@ class AutocompleteEditViewWin
url_parse::Component insecure_scheme_component_;
// Instance of accessibility information and handling.
- mutable ScopedComPtr<IAccessible> autocomplete_accessibility_;
+ mutable base::win::ScopedComPtr<IAccessible> autocomplete_accessibility_;
DISALLOW_COPY_AND_ASSIGN(AutocompleteEditViewWin);
};
diff --git a/chrome/browser/extensions/extension_tts_api_win.cc b/chrome/browser/extensions/extension_tts_api_win.cc
index 30e2236..2b7b54c 100644
--- a/chrome/browser/extensions/extension_tts_api_win.cc
+++ b/chrome/browser/extensions/extension_tts_api_win.cc
@@ -9,10 +9,10 @@
#include <sapi.h>
#include "base/memory/singleton.h"
-#include "base/scoped_comptr_win.h"
#include "base/string_number_conversions.h"
#include "base/utf_string_conversions.h"
#include "base/values.h"
+#include "base/win/scoped_comptr.h"
namespace util = extension_tts_api_util;
@@ -37,7 +37,7 @@ class ExtensionTtsPlatformImplWin : public ExtensionTtsPlatformImpl {
ExtensionTtsPlatformImplWin();
virtual ~ExtensionTtsPlatformImplWin() {}
- ScopedComPtr<ISpVoice> speech_synthesizer_;
+ base::win::ScopedComPtr<ISpVoice> speech_synthesizer_;
bool paused_;
friend struct DefaultSingletonTraits<ExtensionTtsPlatformImplWin>;
diff --git a/chrome/browser/first_run/first_run_win.cc b/chrome/browser/first_run/first_run_win.cc
index 9d963b1..13863b9 100644
--- a/chrome/browser/first_run/first_run_win.cc
+++ b/chrome/browser/first_run/first_run_win.cc
@@ -15,12 +15,12 @@
#include "base/file_util.h"
#include "base/memory/scoped_ptr.h"
#include "base/path_service.h"
-#include "base/scoped_comptr_win.h"
#include "base/string_number_conversions.h"
#include "base/string_split.h"
#include "base/utf_string_conversions.h"
#include "base/win/object_watcher.h"
#include "base/win/registry.h"
+#include "base/win/scoped_comptr.h"
#include "base/win/windows_version.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/extension_updater.h"
@@ -71,7 +71,7 @@ bool GetNewerChromeFile(FilePath* path) {
}
bool InvokeGoogleUpdateForRename() {
- ScopedComPtr<IProcessLauncher> ipl;
+ base::win::ScopedComPtr<IProcessLauncher> ipl;
if (!FAILED(ipl.CreateInstance(__uuidof(ProcessLauncherClass)))) {
ULONG_PTR phandle = NULL;
DWORD id = GetCurrentProcessId();
diff --git a/chrome/browser/google/google_update.cc b/chrome/browser/google/google_update.cc
index feff84c..06d6591 100644
--- a/chrome/browser/google/google_update.cc
+++ b/chrome/browser/google/google_update.cc
@@ -10,19 +10,19 @@
#include "base/file_path.h"
#include "base/message_loop.h"
#include "base/path_service.h"
-#include "base/scoped_comptr_win.h"
#include "base/string_util.h"
#include "base/task.h"
#include "base/threading/thread.h"
#include "base/win/registry.h"
+#include "base/win/scoped_comptr.h"
#include "base/win/windows_version.h"
#include "chrome/installer/util/browser_distribution.h"
#include "chrome/installer/util/google_update_constants.h"
#include "chrome/installer/util/helper.h"
#include "chrome/installer/util/install_util.h"
#include "content/browser/browser_thread.h"
-#include "views/window/window.h"
#include "google_update_idl_i.c"
+#include "views/window/window.h"
using views::Window;
@@ -235,7 +235,7 @@ class GoogleUpdateJobObserver
// Allows us control the upgrade process to a small degree. After OnComplete
// has been called, this object can not be used.
- ScopedComPtr<IProgressWndEvents> event_sink_;
+ base::win::ScopedComPtr<IProgressWndEvents> event_sink_;
};
////////////////////////////////////////////////////////////////////////////////
@@ -292,9 +292,9 @@ bool GoogleUpdate::InitiateGoogleUpdateCheck(bool install_if_newer,
main_loop);
}
- ScopedComPtr<IJobObserver> job_holder(job_observer);
+ base::win::ScopedComPtr<IJobObserver> job_holder(job_observer);
- ScopedComPtr<IGoogleUpdate> on_demand;
+ base::win::ScopedComPtr<IGoogleUpdate> on_demand;
bool system_level = false;
diff --git a/chrome/browser/history/history_publisher.h b/chrome/browser/history/history_publisher.h
index f5ac086..4718801 100644
--- a/chrome/browser/history/history_publisher.h
+++ b/chrome/browser/history/history_publisher.h
@@ -12,7 +12,7 @@
#include "base/string16.h"
#if defined(OS_WIN)
-#include "base/scoped_comptr_win.h"
+#include "base/win/scoped_comptr.h"
#include "history_indexer.h"
#endif
@@ -63,7 +63,8 @@ class HistoryPublisher {
// Returns '0' if the time object is NULL.
static double TimeToUTCVariantTime(const base::Time& time);
- typedef std::vector< ScopedComPtr<IChromeHistoryIndexer> > IndexerList;
+ typedef std::vector< base::win::ScopedComPtr<
+ IChromeHistoryIndexer> > IndexerList;
// The list of indexers registered to receive history data from us.
IndexerList indexers_;
diff --git a/chrome/browser/history/history_publisher_win.cc b/chrome/browser/history/history_publisher_win.cc
index f54be58..51c72a6 100644
--- a/chrome/browser/history/history_publisher_win.cc
+++ b/chrome/browser/history/history_publisher_win.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2008-2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -18,9 +18,6 @@
#include "base/win/scoped_variant.h"
#include "googleurl/src/gurl.h"
-using base::win::ScopedVariant;
-using base::win::ScopedBstr;
-
namespace {
// Instantiates a IChromeHistoryIndexer COM object. Takes a COM class id
@@ -43,12 +40,13 @@ bool CoCreateIndexerFromName(const wchar_t* name,
// Instantiates the registered indexers from the registry |root| + |path| key
// and adds them to the |indexers| list.
void AddRegisteredIndexers(HKEY root, const wchar_t* path,
- std::vector< ScopedComPtr<IChromeHistoryIndexer> >* indexers) {
+ std::vector< base::win::ScopedComPtr<IChromeHistoryIndexer> >* indexers) {
IChromeHistoryIndexer* indexer;
base::win::RegistryKeyIterator r_iter(root, path);
while (r_iter.Valid()) {
if (CoCreateIndexerFromName(r_iter.Name(), &indexer)) {
- indexers->push_back(ScopedComPtr<IChromeHistoryIndexer>(indexer));
+ indexers->push_back(
+ base::win::ScopedComPtr<IChromeHistoryIndexer>(indexer));
indexer->Release();
}
++r_iter;
@@ -120,11 +118,11 @@ void HistoryPublisher::PublishDataToIndexers(const PageData& page_data)
// Send data to registered indexers.
base::win::ScopedVariant time(var_time, VT_DATE);
- ScopedBstr url(ASCIIToWide(page_data.url.spec()).c_str());
- ScopedBstr html(page_data.html);
- ScopedBstr title(page_data.title);
+ base::win::ScopedBstr url(ASCIIToWide(page_data.url.spec()).c_str());
+ base::win::ScopedBstr html(page_data.html);
+ base::win::ScopedBstr title(page_data.title);
// Don't send a NULL string through ASCIIToWide.
- ScopedBstr format(page_data.thumbnail_format ?
+ base::win::ScopedBstr format(page_data.thumbnail_format ?
ASCIIToWide(page_data.thumbnail_format).c_str() :
NULL);
base::win::ScopedVariant psa(thumbnail_arr.m_psa);
diff --git a/chrome/browser/jumplist_win.cc b/chrome/browser/jumplist_win.cc
index f57d839..8262d22 100644
--- a/chrome/browser/jumplist_win.cc
+++ b/chrome/browser/jumplist_win.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -16,10 +16,10 @@
#include "base/command_line.h"
#include "base/file_util.h"
#include "base/path_service.h"
-#include "base/scoped_comptr_win.h"
#include "base/string_util.h"
#include "base/threading/thread.h"
#include "base/utf_string_conversions.h"
+#include "base/win/scoped_comptr.h"
#include "base/win/windows_version.h"
#include "chrome/browser/favicon_service.h"
#include "chrome/browser/history/history.h"
@@ -170,12 +170,12 @@ class PropVariantString {
// An IShellLink object is almost the same as an application shortcut, and it
// requires three items: the absolute path to an application, an argument
// string, and a title string.
-HRESULT AddShellLink(ScopedComPtr<IObjectCollection> collection,
+HRESULT AddShellLink(base::win::ScopedComPtr<IObjectCollection> collection,
const std::wstring& application,
const std::wstring& switches,
scoped_refptr<ShellLinkItem> item) {
// Create an IShellLink object.
- ScopedComPtr<IShellLink> link;
+ base::win::ScopedComPtr<IShellLink> link;
HRESULT result = link.CreateInstance(CLSID_ShellLink, NULL,
CLSCTX_INPROC_SERVER);
if (FAILED(result))
@@ -220,7 +220,7 @@ HRESULT AddShellLink(ScopedComPtr<IObjectCollection> collection,
// 4. Call the IPropertyStore::SetValue() function to Set the title property
// of the IShellLink object.
// 5. Commit the transaction.
- ScopedComPtr<IPropertyStore> property_store;
+ base::win::ScopedComPtr<IPropertyStore> property_store;
result = link.QueryInterface(property_store.Receive());
if (FAILED(result))
return result;
@@ -281,7 +281,7 @@ bool CreateIconFile(const SkBitmap& bitmap,
// switches, use an empty string.
// * data (ShellLinkItemList)
// A list of ShellLinkItem objects to be added under the specified category.
-HRESULT UpdateCategory(ScopedComPtr<ICustomDestinationList> list,
+HRESULT UpdateCategory(base::win::ScopedComPtr<ICustomDestinationList> list,
int category_id,
const std::wstring& application,
const std::wstring& switches,
@@ -298,7 +298,7 @@ HRESULT UpdateCategory(ScopedComPtr<ICustomDestinationList> list,
// Create an EnumerableObjectCollection object.
// We once add the given items to this collection object and add this
// collection to the JumpList.
- ScopedComPtr<IObjectCollection> collection;
+ base::win::ScopedComPtr<IObjectCollection> collection;
HRESULT result = collection.CreateInstance(CLSID_EnumerableObjectCollection,
NULL, CLSCTX_INPROC_SERVER);
if (FAILED(result))
@@ -317,7 +317,7 @@ HRESULT UpdateCategory(ScopedComPtr<ICustomDestinationList> list,
// and use it.
// It seems the ICustomDestinationList::AppendCategory() function just
// replaces all items in the given category with the ones in the new list.
- ScopedComPtr<IObjectArray> object_array;
+ base::win::ScopedComPtr<IObjectArray> object_array;
result = collection.QueryInterface(object_array.Receive());
if (FAILED(result))
return false;
@@ -332,12 +332,12 @@ HRESULT UpdateCategory(ScopedComPtr<ICustomDestinationList> list,
// We should use AddUserTasks() instead of AppendCategory().
// * The items in the "Task" category are static.
// We don't have to use a list.
-HRESULT UpdateTaskCategory(ScopedComPtr<ICustomDestinationList> list,
+HRESULT UpdateTaskCategory(base::win::ScopedComPtr<ICustomDestinationList> list,
const std::wstring& chrome_path,
const std::wstring& chrome_switches) {
// Create an EnumerableObjectCollection object to be added items of the
// "Task" category. (We can also use this object for the "Task" category.)
- ScopedComPtr<IObjectCollection> collection;
+ base::win::ScopedComPtr<IObjectCollection> collection;
HRESULT result = collection.CreateInstance(CLSID_EnumerableObjectCollection,
NULL, CLSCTX_INPROC_SERVER);
if (FAILED(result))
@@ -372,7 +372,7 @@ HRESULT UpdateTaskCategory(ScopedComPtr<ICustomDestinationList> list,
// ICustomDestinationList::AddUserTasks() also uses the IObjectArray
// interface to retrieve each item in the list. So, we retrieve the
// IObjectArray interface from the EnumerableObjectCollection object.
- ScopedComPtr<IObjectArray> object_array;
+ base::win::ScopedComPtr<IObjectArray> object_array;
result = collection.QueryInterface(object_array.Receive());
if (FAILED(result))
return result;
@@ -396,7 +396,7 @@ bool UpdateJumpList(const wchar_t* app_id,
return true;
// Create an ICustomDestinationList object and attach it to our application.
- ScopedComPtr<ICustomDestinationList> destination_list;
+ base::win::ScopedComPtr<ICustomDestinationList> destination_list;
HRESULT result = destination_list.CreateInstance(CLSID_DestinationList, NULL,
CLSCTX_INPROC_SERVER);
if (FAILED(result))
@@ -411,7 +411,7 @@ bool UpdateJumpList(const wchar_t* app_id,
// It seems Windows 7 RC (Build 7100) automatically checks the items in this
// removed list and prevent us from adding the same item.
UINT max_slots;
- ScopedComPtr<IObjectArray> removed;
+ base::win::ScopedComPtr<IObjectArray> removed;
result = destination_list->BeginList(&max_slots, __uuidof(*removed),
reinterpret_cast<void**>(&removed));
if (FAILED(result))
diff --git a/chrome/browser/platform_util_win.cc b/chrome/browser/platform_util_win.cc
index bd1cf9c..94d82eb 100644
--- a/chrome/browser/platform_util_win.cc
+++ b/chrome/browser/platform_util_win.cc
@@ -13,14 +13,14 @@
#include "app/win/shell.h"
#include "base/file_path.h"
#include "base/file_util.h"
-#include "base/path_service.h"
#include "base/logging.h"
-#include "base/scoped_comptr_win.h"
+#include "base/path_service.h"
#include "base/string_util.h"
#include "base/utf_string_conversions.h"
#include "base/win/registry.h"
-#include "chrome/installer/util/google_update_settings.h"
+#include "base/win/scoped_comptr.h"
#include "chrome/installer/util/google_update_constants.h"
+#include "chrome/installer/util/google_update_settings.h"
#include "chrome/installer/util/install_util.h"
#include "googleurl/src/gurl.h"
#include "ui/base/message_box_win.h"
@@ -64,7 +64,7 @@ void ShowItemInFolder(const FilePath& full_path) {
return;
}
- ScopedComPtr<IShellFolder> desktop;
+ base::win::ScopedComPtr<IShellFolder> desktop;
HRESULT hr = SHGetDesktopFolder(desktop.Receive());
if (FAILED(hr))
return;
diff --git a/chrome/browser/renderer_host/render_widget_host_view_win.cc b/chrome/browser/renderer_host/render_widget_host_view_win.cc
index 52ef7d2..9a92002 100644
--- a/chrome/browser/renderer_host/render_widget_host_view_win.cc
+++ b/chrome/browser/renderer_host/render_widget_host_view_win.cc
@@ -10,8 +10,8 @@
#include "base/i18n/rtl.h"
#include "base/metrics/histogram.h"
#include "base/process_util.h"
-#include "base/scoped_comptr_win.h"
#include "base/threading/thread.h"
+#include "base/win/scoped_comptr.h"
#include "base/win/scoped_gdi_object.h"
#include "base/win/wrapped_window_proc.h"
#include "chrome/browser/accessibility/browser_accessibility_manager.h"
@@ -1659,7 +1659,7 @@ LRESULT RenderWidgetHostViewWin::OnGetObject(UINT message, WPARAM wparam,
BrowserAccessibilityManager::Create(m_hWnd, loading_tree, this));
}
- ScopedComPtr<IAccessible> root(
+ base::win::ScopedComPtr<IAccessible> root(
browser_accessibility_manager_->GetRoot()->toBrowserAccessibilityWin());
if (root.get())
return LresultFromObject(IID_IAccessible, wparam, root.Detach());
diff --git a/chrome/browser/renderer_host/render_widget_host_view_win.h b/chrome/browser/renderer_host/render_widget_host_view_win.h
index 0fd8c89..e2d3aa8 100644
--- a/chrome/browser/renderer_host/render_widget_host_view_win.h
+++ b/chrome/browser/renderer_host/render_widget_host_view_win.h
@@ -15,8 +15,8 @@
#include "base/memory/scoped_ptr.h"
#include "base/memory/scoped_vector.h"
-#include "base/scoped_comptr_win.h"
#include "base/task.h"
+#include "base/win/scoped_comptr.h"
#include "chrome/browser/accessibility/browser_accessibility_manager.h"
#include "content/browser/renderer_host/render_widget_host_view.h"
#include "content/common/notification_observer.h"
diff --git a/chrome/browser/shell_integration_win.cc b/chrome/browser/shell_integration_win.cc
index 0b9c32e..72f9ad1 100644
--- a/chrome/browser/shell_integration_win.cc
+++ b/chrome/browser/shell_integration_win.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -13,11 +13,11 @@
#include "base/file_util.h"
#include "base/message_loop.h"
#include "base/path_service.h"
-#include "base/scoped_comptr_win.h"
#include "base/string_util.h"
#include "base/task.h"
#include "base/utf_string_conversions.h"
#include "base/win/registry.h"
+#include "base/win/scoped_comptr.h"
#include "base/win/windows_version.h"
#include "chrome/browser/web_applications/web_app.h"
#include "chrome/common/chrome_constants.h"
@@ -154,7 +154,7 @@ void MigrateChromiumShortcutsTask::MigrateWin7ShortcutsInPath(
for (FilePath shortcut = shortcuts_enum.Next(); !shortcut.empty();
shortcut = shortcuts_enum.Next()) {
// Load the shortcut.
- ScopedComPtr<IShellLink> shell_link;
+ base::win::ScopedComPtr<IShellLink> shell_link;
if (FAILED(shell_link.CreateInstance(CLSID_ShellLink,
NULL,
CLSCTX_INPROC_SERVER))) {
@@ -162,7 +162,7 @@ void MigrateChromiumShortcutsTask::MigrateWin7ShortcutsInPath(
return;
}
- ScopedComPtr<IPersistFile> persist_file;
+ base::win::ScopedComPtr<IPersistFile> persist_file;
if (FAILED(persist_file.QueryFrom(shell_link)) ||
FAILED(persist_file->Load(shortcut.value().c_str(), STGM_READ))) {
NOTREACHED();
@@ -248,7 +248,7 @@ bool MigrateChromiumShortcutsTask::GetShortcutAppId(
app_id->clear();
- ScopedComPtr<IPropertyStore> property_store;
+ base::win::ScopedComPtr<IPropertyStore> property_store;
if (FAILED(property_store.QueryFrom(shell_link)))
return false;
diff --git a/chrome/browser/ui/views/shell_dialogs_win.cc b/chrome/browser/ui/views/shell_dialogs_win.cc
index f4144e0..f35a8bd 100644
--- a/chrome/browser/ui/views/shell_dialogs_win.cc
+++ b/chrome/browser/ui/views/shell_dialogs_win.cc
@@ -14,11 +14,11 @@
#include "base/file_path.h"
#include "base/file_util.h"
#include "base/message_loop.h"
-#include "base/scoped_comptr_win.h"
#include "base/string_split.h"
#include "base/threading/thread.h"
#include "base/utf_string_conversions.h"
#include "base/win/registry.h"
+#include "base/win/scoped_comptr.h"
#include "base/win/windows_version.h"
#include "content/browser/browser_thread.h"
#include "grit/app_strings.h"
@@ -800,7 +800,7 @@ bool SelectFileDialogImpl::RunSelectFolderDialog(const std::wstring& title,
STRRET out_dir_buffer;
ZeroMemory(&out_dir_buffer, sizeof(out_dir_buffer));
out_dir_buffer.uType = STRRET_WSTR;
- ScopedComPtr<IShellFolder> shell_folder;
+ base::win::ScopedComPtr<IShellFolder> shell_folder;
if (SHGetDesktopFolder(shell_folder.Receive()) == NOERROR) {
HRESULT hr = shell_folder->GetDisplayNameOf(list, SHGDN_FORPARSING,
&out_dir_buffer);
diff --git a/chrome/common/win_safe_util.cc b/chrome/common/win_safe_util.cc
index 693ce35..6e4ff14 100644
--- a/chrome/common/win_safe_util.cc
+++ b/chrome/common/win_safe_util.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -11,8 +11,8 @@
#include "base/file_path.h"
#include "base/logging.h"
#include "base/path_service.h"
-#include "base/scoped_comptr_win.h"
#include "base/string_util.h"
+#include "base/win/scoped_comptr.h"
namespace win_util {
@@ -24,7 +24,7 @@ namespace win_util {
bool SaferOpenItemViaShell(HWND hwnd, const std::wstring& window_title,
const FilePath& full_path,
const std::wstring& source_url) {
- ScopedComPtr<IAttachmentExecute> attachment_services;
+ base::win::ScopedComPtr<IAttachmentExecute> attachment_services;
HRESULT hr = attachment_services.CreateInstance(CLSID_AttachmentServices);
if (FAILED(hr)) {
// We don't have Attachment Execution Services, it must be a pre-XP.SP2
diff --git a/chrome/installer/util/shell_util_unittest.cc b/chrome/installer/util/shell_util_unittest.cc
index b14007e..345c1e7 100644
--- a/chrome/installer/util/shell_util_unittest.cc
+++ b/chrome/installer/util/shell_util_unittest.cc
@@ -10,8 +10,8 @@
#include "base/file_util.h"
#include "base/path_service.h"
-#include "base/scoped_comptr_win.h"
#include "base/memory/scoped_temp_dir.h"
+#include "base/win/scoped_comptr.h"
#include "chrome/installer/util/browser_distribution.h"
#include "chrome/installer/util/master_preferences.h"
#include "chrome/installer/util/shell_util.h"
@@ -22,8 +22,8 @@ bool VerifyChromeShortcut(const std::wstring& exe_path,
const std::wstring& shortcut,
const std::wstring& description,
int icon_index) {
- ScopedComPtr<IShellLink> i_shell_link;
- ScopedComPtr<IPersistFile> i_persist_file;
+ base::win::ScopedComPtr<IShellLink> i_shell_link;
+ base::win::ScopedComPtr<IPersistFile> i_persist_file;
// Get pointer to the IShellLink interface
bool failed = FAILED(i_shell_link.CreateInstance(CLSID_ShellLink, NULL,
diff --git a/chrome/service/cloud_print/print_system_win.cc b/chrome/service/cloud_print/print_system_win.cc
index 2217427..82d5b43 100644
--- a/chrome/service/cloud_print/print_system_win.cc
+++ b/chrome/service/cloud_print/print_system_win.cc
@@ -31,9 +31,6 @@
#include "ui/base/l10n/l10n_util.h"
#include "ui/gfx/rect.h"
-using base::win::ScopedBstr;
-using base::win::ScopedComPtr;
-
namespace {
class DevMode {
@@ -89,7 +86,7 @@ HRESULT PrintTicketToDevMode(const std::string& printer_name,
return E_FAIL;
}
- ScopedComPtr<IStream> pt_stream;
+ base::win::ScopedComPtr<IStream> pt_stream;
HRESULT hr = StreamFromPrintTicket(print_ticket, pt_stream.Receive());
if (FAILED(hr))
return hr;
@@ -563,8 +560,8 @@ class PrintSystemWin : public PrintSystem {
return false;
should_couninit_ = SUCCEEDED(CoInitializeEx(NULL,
COINIT_MULTITHREADED));
- ScopedComPtr<IXpsPrintJobStream> doc_stream;
- ScopedComPtr<IXpsPrintJobStream> print_ticket_stream;
+ base::win::ScopedComPtr<IXpsPrintJobStream> doc_stream;
+ base::win::ScopedComPtr<IXpsPrintJobStream> print_ticket_stream;
bool ret = false;
// Use nested SUCCEEDED checks because we want a common return point.
if (SUCCEEDED(printing::XPSPrintModule::StartXpsPrintJob(
@@ -627,7 +624,7 @@ class PrintSystemWin : public PrintSystem {
FilePath print_data_file_path_;
base::win::ScopedHandle job_progress_event_;
base::win::ObjectWatcher job_progress_watcher_;
- ScopedComPtr<IXpsPrintJob> xps_print_job_;
+ base::win::ScopedComPtr<IXpsPrintJob> xps_print_job_;
bool should_couninit_;
DISALLOW_COPY_AND_ASSIGN(JobSpoolerWin::Core);
};
@@ -758,7 +755,7 @@ bool PrintSystemWin::ValidatePrintTicket(
1,
&provider);
if (provider) {
- ScopedComPtr<IStream> print_ticket_stream;
+ base::win::ScopedComPtr<IStream> print_ticket_stream;
CreateStreamOnHGlobal(NULL, TRUE, print_ticket_stream.Receive());
ULONG bytes_written = 0;
print_ticket_stream->Write(print_ticket_data.c_str(),
@@ -768,8 +765,8 @@ bool PrintSystemWin::ValidatePrintTicket(
LARGE_INTEGER pos = {0};
ULARGE_INTEGER new_pos = {0};
print_ticket_stream->Seek(pos, STREAM_SEEK_SET, &new_pos);
- ScopedBstr error;
- ScopedComPtr<IStream> result_ticket_stream;
+ base::win::ScopedBstr error;
+ base::win::ScopedComPtr<IStream> result_ticket_stream;
CreateStreamOnHGlobal(NULL, TRUE, result_ticket_stream.Receive());
ret = SUCCEEDED(printing::XPSModule::MergeAndValidatePrintTicket(
provider,
diff --git a/chrome_frame/bho.cc b/chrome_frame/bho.cc
index 5ac26f4..f6b87a4 100644
--- a/chrome_frame/bho.cc
+++ b/chrome_frame/bho.cc
@@ -94,7 +94,7 @@ void ReadyModeDelegateImpl::DisableChromeFrame() {
STDMETHODIMP Bho::SetSite(IUnknown* site) {
HRESULT hr = S_OK;
if (site) {
- ScopedComPtr<IWebBrowser2> web_browser2;
+ base::win::ScopedComPtr<IWebBrowser2> web_browser2;
web_browser2.QueryFrom(site);
if (web_browser2) {
hr = DispEventAdvise(web_browser2, &DIID_DWebBrowserEvents2);
@@ -104,7 +104,7 @@ STDMETHODIMP Bho::SetSite(IUnknown* site) {
}
if (g_patch_helper.state() == PatchHelper::PATCH_IBROWSER) {
- ScopedComPtr<IBrowserService> browser_service;
+ base::win::ScopedComPtr<IBrowserService> browser_service;
hr = DoQueryService(SID_SShellBrowser, site, browser_service.Receive());
DCHECK(browser_service) << "DoQueryService - SID_SShellBrowser failed."
<< " Site: " << site << " Error: " << hr;
@@ -128,7 +128,7 @@ STDMETHODIMP Bho::SetSite(IUnknown* site) {
} else {
UnregisterThreadInstance();
buggy_bho::BuggyBhoTls::DestroyInstance();
- ScopedComPtr<IWebBrowser2> web_browser2;
+ base::win::ScopedComPtr<IWebBrowser2> web_browser2;
web_browser2.QueryFrom(m_spUnkSite);
DispEventUnadvise(web_browser2, &DIID_DWebBrowserEvents2);
Release();
@@ -145,7 +145,7 @@ STDMETHODIMP Bho::BeforeNavigate2(IDispatch* dispatch, VARIANT* url,
return S_OK;
}
- ScopedComPtr<IWebBrowser2> web_browser2;
+ base::win::ScopedComPtr<IWebBrowser2> web_browser2;
if (dispatch)
web_browser2.QueryFrom(dispatch);
@@ -156,7 +156,7 @@ STDMETHODIMP Bho::BeforeNavigate2(IDispatch* dispatch, VARIANT* url,
DVLOG(1) << "BeforeNavigate2: " << url->bstrVal;
- ScopedComPtr<IBrowserService> browser_service;
+ base::win::ScopedComPtr<IBrowserService> browser_service;
DoQueryService(SID_SShellBrowser, web_browser2, browser_service.Receive());
if (!browser_service || !CheckForCFNavigation(browser_service, false)) {
// TODO(tommi): Remove? Isn't this done below by calling set_referrer("")?
@@ -181,7 +181,7 @@ STDMETHODIMP_(void) Bho::NavigateComplete2(IDispatch* dispatch, VARIANT* url) {
STDMETHODIMP_(void) Bho::DocumentComplete(IDispatch* dispatch, VARIANT* url) {
DVLOG(1) << __FUNCTION__;
- ScopedComPtr<IWebBrowser2> web_browser2;
+ base::win::ScopedComPtr<IWebBrowser2> web_browser2;
if (dispatch)
web_browser2.QueryFrom(dispatch);
@@ -199,12 +199,12 @@ namespace {
// See comments in Bho::OnHttpEquiv for details.
void ClearDocumentContents(IUnknown* browser) {
- ScopedComPtr<IWebBrowser2> web_browser2;
+ base::win::ScopedComPtr<IWebBrowser2> web_browser2;
if (SUCCEEDED(DoQueryService(SID_SWebBrowserApp, browser,
web_browser2.Receive()))) {
- ScopedComPtr<IDispatch> doc_disp;
+ base::win::ScopedComPtr<IDispatch> doc_disp;
web_browser2->get_Document(doc_disp.Receive());
- ScopedComPtr<IHTMLDocument2> doc;
+ base::win::ScopedComPtr<IHTMLDocument2> doc;
if (doc_disp && SUCCEEDED(doc.QueryFrom(doc_disp))) {
SAFEARRAY* sa = ::SafeArrayCreateVector(VT_UI1, 0, 0);
doc->write(sa);
@@ -218,17 +218,17 @@ void ClearDocumentContents(IUnknown* browser) {
bool DocumentHasEmbeddedItems(IUnknown* browser) {
bool has_embedded_items = false;
- ScopedComPtr<IWebBrowser2> web_browser2;
- ScopedComPtr<IDispatch> document;
+ base::win::ScopedComPtr<IWebBrowser2> web_browser2;
+ base::win::ScopedComPtr<IDispatch> document;
if (SUCCEEDED(DoQueryService(SID_SWebBrowserApp, browser,
web_browser2.Receive())) &&
SUCCEEDED(web_browser2->get_Document(document.Receive()))) {
- ScopedComPtr<IOleContainer> container;
+ base::win::ScopedComPtr<IOleContainer> container;
if (SUCCEEDED(container.QueryFrom(document))) {
- ScopedComPtr<IEnumUnknown> enumerator;
+ base::win::ScopedComPtr<IEnumUnknown> enumerator;
container->EnumObjects(OLECONTF_EMBEDDINGS, enumerator.Receive());
if (enumerator) {
- ScopedComPtr<IUnknown> unk;
+ base::win::ScopedComPtr<IUnknown> unk;
DWORD fetched = 0;
while (!has_embedded_items &&
SUCCEEDED(enumerator->Next(1, unk.Receive(), &fetched))
@@ -237,7 +237,7 @@ bool DocumentHasEmbeddedItems(IUnknown* browser) {
// that first the top level document finishes loading and then the
// iframes load. We should only treat an embedded element as an
// iframe if it supports the IWebBrowser interface.
- ScopedComPtr<IWebBrowser2> embedded_web_browser2;
+ base::win::ScopedComPtr<IWebBrowser2> embedded_web_browser2;
if (SUCCEEDED(embedded_web_browser2.QueryFrom(unk))) {
// If we initiate a top level navigation then at times MSHTML
// creates a temporary IWebBrowser2 interface which basically shows
@@ -340,7 +340,7 @@ void Bho::ProcessOptInUrls(IWebBrowser2* browser, BSTR url) {
bool cf_protocol = StartsWith(current_url, kChromeProtocolPrefix, false);
if (!cf_protocol && IsChrome(RendererTypeForUrl(current_url))) {
DVLOG(1) << "Opt-in URL. Switching to cf.";
- ScopedComPtr<IBrowserService> browser_service;
+ base::win::ScopedComPtr<IBrowserService> browser_service;
DoQueryService(SID_SShellBrowser, browser, browser_service.Receive());
DCHECK(browser_service) << "DoQueryService - SID_SShellBrowser failed.";
MarkBrowserOnThreadForCFNavigation(browser_service);
diff --git a/chrome_frame/bho.h b/chrome_frame/bho.h
index d1f232d..111eb04 100644
--- a/chrome_frame/bho.h
+++ b/chrome_frame/bho.h
@@ -111,7 +111,7 @@ END_SINK_MAP()
static void ProcessOptInUrls(IWebBrowser2* browser, BSTR url);
// COM_INTERFACE_ENTRY_CACHED_TEAR_OFF manages the raw pointer from CComPtr
- // which ScopedComPtr doesn't expose.
+ // which base::win::ScopedComPtr doesn't expose.
CComPtr<IUnknown> delete_chrome_history_;
protected:
diff --git a/chrome_frame/bind_context_info.cc b/chrome_frame/bind_context_info.cc
index 89d6991..bfdf89a 100644
--- a/chrome_frame/bind_context_info.cc
+++ b/chrome_frame/bind_context_info.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -39,11 +39,11 @@ HRESULT BindContextInfo::FromBindContext(IBindCtx* bind_context,
return E_POINTER;
}
- ScopedComPtr<IUnknown> context;
+ base::win::ScopedComPtr<IUnknown> context;
HRESULT hr = bind_context->GetObjectParam(kBindContextInfo,
context.Receive());
if (context) {
- ScopedComPtr<IBindContextInfoInternal> internal;
+ base::win::ScopedComPtr<IBindContextInfoInternal> internal;
hr = internal.QueryFrom(context);
if (SUCCEEDED(hr)) {
hr = internal->GetCppObject(reinterpret_cast<void**>(info));
diff --git a/chrome_frame/bind_context_info.h b/chrome_frame/bind_context_info.h
index e9add10..7c0e421 100644
--- a/chrome_frame/bind_context_info.h
+++ b/chrome_frame/bind_context_info.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -35,7 +35,7 @@ class __declspec(uuid("00000000-0000-0000-0000-000000000000")) BindContextInfo
// Returns the BindContextInfo instance associated with the bind
// context. Creates it if needed.
// The returned info object will be AddRef-ed on return, so use
- // ScopedComPtr<>::Receive() to receive this pointer.
+ // base::win::ScopedComPtr<>::Receive() to receive this pointer.
static HRESULT FromBindContext(IBindCtx* bind_context,
BindContextInfo** info);
@@ -106,7 +106,7 @@ class __declspec(uuid("00000000-0000-0000-0000-000000000000")) BindContextInfo
bool is_switching_;
base::win::ScopedComPtr<IUnknown> ftm_;
scoped_refptr<ProtData> prot_data_;
- ScopedComPtr<IInternetProtocol> protocol_;
+ base::win::ScopedComPtr<IInternetProtocol> protocol_;
DISALLOW_COPY_AND_ASSIGN(BindContextInfo);
};
diff --git a/chrome_frame/bind_status_callback_impl.cc b/chrome_frame/bind_status_callback_impl.cc
index 9e535e5..4a3c588 100644
--- a/chrome_frame/bind_status_callback_impl.cc
+++ b/chrome_frame/bind_status_callback_impl.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -65,7 +65,7 @@ HRESULT BSCBImpl::ReleaseBind() {
HRESULT BSCBImpl::QueryService(REFGUID service, REFIID iid, void** object) {
HRESULT hr = E_NOINTERFACE;
if (delegate_) {
- ScopedComPtr<IServiceProvider> svc;
+ base::win::ScopedComPtr<IServiceProvider> svc;
svc.QueryFrom(delegate_);
if (svc) {
hr = svc->QueryService(service, iid, object);
@@ -159,7 +159,7 @@ HRESULT BSCBImpl::GetBindInfoEx(DWORD* bindf, BINDINFO* bind_info,
<< base::StringPrintf(" tid=%i", base::PlatformThread::CurrentId());
HRESULT hr = S_OK;
if (delegate_) {
- ScopedComPtr<IBindStatusCallbackEx> bscbex;
+ base::win::ScopedComPtr<IBindStatusCallbackEx> bscbex;
bscbex.QueryFrom(delegate_);
if (bscbex)
hr = bscbex->GetBindInfoEx(bindf, bind_info, bindf2, reserved);
@@ -175,7 +175,7 @@ HRESULT BSCBImpl::BeginningTransaction(LPCWSTR url, LPCWSTR headers,
HRESULT hr = S_OK;
if (delegate_) {
- ScopedComPtr<IHttpNegotiate> http_negotiate;
+ base::win::ScopedComPtr<IHttpNegotiate> http_negotiate;
http_negotiate.QueryFrom(delegate_);
if (http_negotiate) {
hr = http_negotiate->BeginningTransaction(url, headers, reserved,
@@ -195,7 +195,7 @@ HRESULT BSCBImpl::OnResponse(DWORD response_code, LPCWSTR response_headers,
HRESULT hr = S_OK;
if (delegate_) {
- ScopedComPtr<IHttpNegotiate> http_negotiate;
+ base::win::ScopedComPtr<IHttpNegotiate> http_negotiate;
http_negotiate.QueryFrom(delegate_);
if (http_negotiate) {
hr = http_negotiate->OnResponse(response_code, response_headers,
@@ -209,7 +209,7 @@ HRESULT BSCBImpl::GetRootSecurityId(BYTE* security_id, DWORD* security_id_size,
DWORD_PTR reserved) {
HRESULT hr = S_OK;
if (delegate_) {
- ScopedComPtr<IHttpNegotiate2> http_negotiate;
+ base::win::ScopedComPtr<IHttpNegotiate2> http_negotiate;
http_negotiate.QueryFrom(delegate_);
if (http_negotiate) {
hr = http_negotiate->GetRootSecurityId(security_id, security_id_size,
@@ -223,7 +223,7 @@ HRESULT BSCBImpl::GetSerializedClientCertContext(BYTE** cert,
DWORD* cert_size) {
HRESULT hr = S_OK;
if (delegate_) {
- ScopedComPtr<IHttpNegotiate3> http_negotiate;
+ base::win::ScopedComPtr<IHttpNegotiate3> http_negotiate;
http_negotiate.QueryFrom(delegate_);
if (http_negotiate) {
return http_negotiate->GetSerializedClientCertContext(cert, cert_size);
diff --git a/chrome_frame/bind_status_callback_impl.h b/chrome_frame/bind_status_callback_impl.h
index 7066050..57245e4 100644
--- a/chrome_frame/bind_status_callback_impl.h
+++ b/chrome_frame/bind_status_callback_impl.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -10,7 +10,7 @@
#include <string>
#include <urlmon.h>
-#include "base/scoped_comptr_win.h"
+#include "base/win/scoped_comptr.h"
#include "chrome_frame/utils.h"
// A generic base class for IBindStatus callback implementation.
@@ -88,8 +88,8 @@ END_COM_MAP()
// used for logging.
std::string me();
- ScopedComPtr<IBindStatusCallback> delegate_;
- ScopedComPtr<IBindCtx> bind_ctx_;
+ base::win::ScopedComPtr<IBindStatusCallback> delegate_;
+ base::win::ScopedComPtr<IBindCtx> bind_ctx_;
private:
DISALLOW_COPY_AND_ASSIGN(BSCBImpl);
diff --git a/chrome_frame/buggy_bho_handling.cc b/chrome_frame/buggy_bho_handling.cc
index bcd2427..227c999 100644
--- a/chrome_frame/buggy_bho_handling.cc
+++ b/chrome_frame/buggy_bho_handling.cc
@@ -1,11 +1,11 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome_frame/buggy_bho_handling.h"
#include "base/logging.h"
-#include "base/scoped_comptr_win.h"
+#include "base/win/scoped_comptr.h"
#include "chrome_frame/exception_barrier.h"
#include "chrome_frame/function_stub.h"
@@ -125,15 +125,15 @@ HRESULT BuggyBhoTls::PatchBuggyBHOs(IWebBrowser2* browser) {
DCHECK(browser);
DCHECK(web_browser2_ == NULL);
- ScopedComPtr<IConnectionPointContainer> cpc;
+ base::win::ScopedComPtr<IConnectionPointContainer> cpc;
HRESULT hr = cpc.QueryFrom(browser);
if (SUCCEEDED(hr)) {
const GUID sinks[] = { DIID_DWebBrowserEvents2, DIID_DWebBrowserEvents };
for (size_t i = 0; i < arraysize(sinks); ++i) {
- ScopedComPtr<IConnectionPoint> cp;
+ base::win::ScopedComPtr<IConnectionPoint> cp;
cpc->FindConnectionPoint(sinks[i], cp.Receive());
if (cp) {
- ScopedComPtr<IEnumConnections> connections;
+ base::win::ScopedComPtr<IEnumConnections> connections;
cp->EnumConnections(connections.Receive());
if (connections) {
CONNECTDATA cd = {0};
@@ -159,7 +159,7 @@ bool BuggyBhoTls::PatchIfBuggy(IUnknown* unk, const IID& diid) {
if (!IsBuggyBho(mod))
return false;
- ScopedComPtr<IDispatch> disp;
+ base::win::ScopedComPtr<IDispatch> disp;
HRESULT hr = unk->QueryInterface(diid,
reinterpret_cast<void**>(disp.Receive()));
if (FAILED(hr)) // Sometimes only IDispatch QI is supported
diff --git a/chrome_frame/chrome_active_document.cc b/chrome_frame/chrome_active_document.cc
index a75a6cd..98c4d76 100644
--- a/chrome_frame/chrome_active_document.cc
+++ b/chrome_frame/chrome_active_document.cc
@@ -30,7 +30,6 @@
#include "base/utf_string_conversions.h"
#include "base/win/scoped_variant.h"
#include "base/win/win_util.h"
-#include "grit/generated_resources.h"
#include "chrome/app/chrome_command_ids.h"
#include "chrome/app/chrome_dll_resource.h"
#include "chrome/common/automation_messages.h"
@@ -45,6 +44,7 @@
#include "content/browser/tab_contents/tab_contents.h"
#include "content/common/navigation_types.h"
#include "content/common/page_zoom.h"
+#include "grit/generated_resources.h"
DEFINE_GUID(CGID_DocHostCmdPriv, 0x000214D4L, 0, 0, 0xC0, 0, 0, 0, 0, 0, 0,
0x46);
@@ -154,7 +154,7 @@ STDMETHODIMP ChromeActiveDocument::DoVerb(LONG verb,
if (doc_site_) {
switch (verb) {
case OLEIVERB_SHOW: {
- ScopedComPtr<IDocHostUIHandler> doc_host_handler;
+ base::win::ScopedComPtr<IDocHostUIHandler> doc_host_handler;
doc_host_handler.QueryFrom(doc_site_);
if (doc_host_handler.get())
doc_host_handler->ShowUI(DOCHOSTUITYPE_BROWSE, this, this, NULL, NULL);
@@ -215,9 +215,9 @@ STDMETHODIMP ChromeActiveDocument::Load(BOOL fully_avalable,
if (NULL == moniker_name)
return E_INVALIDARG;
- ScopedComPtr<IOleClientSite> client_site;
+ base::win::ScopedComPtr<IOleClientSite> client_site;
if (bind_context) {
- ScopedComPtr<IUnknown> site;
+ base::win::ScopedComPtr<IUnknown> site;
bind_context->GetObjectParam(SZ_HTML_CLIENTSITE_OBJECTPARAM,
site.Receive());
if (site)
@@ -232,7 +232,7 @@ STDMETHODIMP ChromeActiveDocument::Load(BOOL fully_avalable,
// See if mshtml parsed the html header for us. If so, we need to
// clear the browser service flag that we use to indicate that this
// browser instance is navigating to a CF document.
- ScopedComPtr<IBrowserService> browser_service;
+ base::win::ScopedComPtr<IBrowserService> browser_service;
DoQueryService(SID_SShellBrowser, client_site, browser_service.Receive());
if (browser_service) {
bool flagged = CheckForCFNavigation(browser_service, true);
@@ -245,7 +245,7 @@ STDMETHODIMP ChromeActiveDocument::Load(BOOL fully_avalable,
std::wstring url;
- ScopedComPtr<BindContextInfo> info;
+ base::win::ScopedComPtr<BindContextInfo> info;
BindContextInfo::FromBindContext(bind_context, info.Receive());
DCHECK(info);
if (info && !info->GetUrl().empty()) {
@@ -550,7 +550,7 @@ HRESULT ChromeActiveDocument::IOleObject_SetClientSite(
cached_document->Release();
}
- ScopedComPtr<IDocHostUIHandler> doc_host_handler;
+ base::win::ScopedComPtr<IDocHostUIHandler> doc_host_handler;
if (doc_site_)
doc_host_handler.QueryFrom(doc_site_);
@@ -578,7 +578,7 @@ HRESULT ChromeActiveDocument::ActiveXDocActivate(LONG verb) {
m_bInPlaceActive = TRUE;
// get location in the parent window,
// as well as some information about the parent
- ScopedComPtr<IOleInPlaceUIWindow> in_place_ui_window;
+ base::win::ScopedComPtr<IOleInPlaceUIWindow> in_place_ui_window;
frame_info_.cb = sizeof(OLEINPLACEFRAMEINFO);
HWND parent_window = NULL;
if (m_spInPlaceSite->GetWindow(&parent_window) == S_OK) {
@@ -607,7 +607,7 @@ HRESULT ChromeActiveDocument::ActiveXDocActivate(LONG verb) {
SetObjectRects(&position_rect, &clip_rect);
}
- ScopedComPtr<IOleInPlaceActiveObject> in_place_active_object(this);
+ base::win::ScopedComPtr<IOleInPlaceActiveObject> in_place_active_object(this);
// Gone active by now, take care of UIACTIVATE
if (DoesVerbUIActivate(verb)) {
@@ -707,7 +707,7 @@ void ChromeActiveDocument::OnCloseTab() {
BaseActiveX::OnCloseTab();
// Close the container window.
- ScopedComPtr<IWebBrowser2> web_browser2;
+ base::win::ScopedComPtr<IWebBrowser2> web_browser2;
DoQueryService(SID_SWebBrowserApp, m_spClientSite, web_browser2.Receive());
if (web_browser2)
web_browser2->Quit();
@@ -754,7 +754,7 @@ void ChromeActiveDocument::UpdateNavigationState(
// event sink's of these bho's and don't invoke the event sink if chrome
// frame is the currently loaded document.
if (GetConfigBool(true, kEnableBuggyBhoIntercept)) {
- ScopedComPtr<IWebBrowser2> wb2;
+ base::win::ScopedComPtr<IWebBrowser2> wb2;
DoQueryService(SID_SWebBrowserApp, m_spClientSite, wb2.Receive());
if (wb2 && buggy_bho::BuggyBhoTls::GetInstance()) {
buggy_bho::BuggyBhoTls::GetInstance()->PatchBuggyBHOs(wb2);
@@ -788,8 +788,8 @@ void ChromeActiveDocument::UpdateNavigationState(
url_.Allocate(UTF8ToWide(new_navigation_info.url.spec()).c_str());
if (is_internal_navigation) {
- ScopedComPtr<IDocObjectService> doc_object_svc;
- ScopedComPtr<IWebBrowserEventsService> web_browser_events_svc;
+ base::win::ScopedComPtr<IDocObjectService> doc_object_svc;
+ base::win::ScopedComPtr<IWebBrowserEventsService> web_browser_events_svc;
DoQueryService(__uuidof(web_browser_events_svc), m_spClientSite,
web_browser_events_svc.Receive());
@@ -982,8 +982,8 @@ void ChromeActiveDocument::OnAttachExternalTab(
}
bool ChromeActiveDocument::PreProcessContextMenu(HMENU menu) {
- ScopedComPtr<IBrowserService> browser_service;
- ScopedComPtr<ITravelLog> travel_log;
+ base::win::ScopedComPtr<IBrowserService> browser_service;
+ base::win::ScopedComPtr<ITravelLog> travel_log;
GetBrowserServiceAndTravelLog(browser_service.Receive(),
travel_log.Receive());
if (!browser_service || !travel_log)
@@ -1003,7 +1003,7 @@ bool ChromeActiveDocument::PreProcessContextMenu(HMENU menu) {
bool ChromeActiveDocument::HandleContextMenuCommand(
UINT cmd, const MiniContextMenuParams& params) {
- ScopedComPtr<IWebBrowser2> web_browser2;
+ base::win::ScopedComPtr<IWebBrowser2> web_browser2;
DoQueryService(SID_SWebBrowserApp, m_spClientSite, web_browser2.Receive());
if (cmd == IDC_BACK)
@@ -1023,9 +1023,9 @@ HRESULT ChromeActiveDocument::IEExec(const GUID* cmd_group_guid,
VARIANT* in_args, VARIANT* out_args) {
HRESULT hr = E_FAIL;
- ScopedComPtr<IOleCommandTarget> frame_cmd_target;
+ base::win::ScopedComPtr<IOleCommandTarget> frame_cmd_target;
- ScopedComPtr<IOleInPlaceSite> in_place_site(m_spInPlaceSite);
+ base::win::ScopedComPtr<IOleInPlaceSite> in_place_site(m_spInPlaceSite);
if (!in_place_site.get() && m_spClientSite != NULL)
in_place_site.QueryFrom(m_spClientSite);
@@ -1251,8 +1251,8 @@ HRESULT ChromeActiveDocument::OnEncodingChange(const GUID* cmd_group_guid,
void ChromeActiveDocument::OnGoToHistoryEntryOffset(int offset) {
DVLOG(1) << __FUNCTION__ << " - offset:" << offset;
- ScopedComPtr<IBrowserService> browser_service;
- ScopedComPtr<ITravelLog> travel_log;
+ base::win::ScopedComPtr<IBrowserService> browser_service;
+ base::win::ScopedComPtr<ITravelLog> travel_log;
GetBrowserServiceAndTravelLog(browser_service.Receive(),
travel_log.Receive());
@@ -1261,7 +1261,7 @@ void ChromeActiveDocument::OnGoToHistoryEntryOffset(int offset) {
}
void ChromeActiveDocument::OnMoveWindow(const gfx::Rect& dimensions) {
- ScopedComPtr<IWebBrowser2> web_browser2;
+ base::win::ScopedComPtr<IWebBrowser2> web_browser2;
DoQueryService(SID_SWebBrowserApp, m_spClientSite,
web_browser2.Receive());
if (!web_browser2)
@@ -1289,7 +1289,7 @@ void ChromeActiveDocument::OnMoveWindow(const gfx::Rect& dimensions) {
HRESULT ChromeActiveDocument::GetBrowserServiceAndTravelLog(
IBrowserService** browser_service, ITravelLog** travel_log) {
DCHECK(browser_service || travel_log);
- ScopedComPtr<IBrowserService> browser_service_local;
+ base::win::ScopedComPtr<IBrowserService> browser_service_local;
HRESULT hr = DoQueryService(SID_SShellBrowser, m_spClientSite,
browser_service_local.Receive());
if (!browser_service_local) {
@@ -1311,7 +1311,7 @@ HRESULT ChromeActiveDocument::GetBrowserServiceAndTravelLog(
LRESULT ChromeActiveDocument::OnForward(WORD notify_code, WORD id,
HWND control_window,
BOOL& bHandled) {
- ScopedComPtr<IWebBrowser2> web_browser2;
+ base::win::ScopedComPtr<IWebBrowser2> web_browser2;
DoQueryService(SID_SWebBrowserApp, m_spClientSite, web_browser2.Receive());
DCHECK(web_browser2);
@@ -1323,7 +1323,7 @@ LRESULT ChromeActiveDocument::OnForward(WORD notify_code, WORD id,
LRESULT ChromeActiveDocument::OnBack(WORD notify_code, WORD id,
HWND control_window,
BOOL& bHandled) {
- ScopedComPtr<IWebBrowser2> web_browser2;
+ base::win::ScopedComPtr<IWebBrowser2> web_browser2;
DoQueryService(SID_SWebBrowserApp, m_spClientSite, web_browser2.Receive());
DCHECK(web_browser2);
@@ -1338,7 +1338,7 @@ LRESULT ChromeActiveDocument::OnFirePrivacyChange(UINT message, WPARAM wparam,
if (!m_spClientSite)
return 0;
- ScopedComPtr<IWebBrowser2> web_browser2;
+ base::win::ScopedComPtr<IWebBrowser2> web_browser2;
DoQueryService(SID_SWebBrowserApp, m_spClientSite,
web_browser2.Receive());
if (!web_browser2) {
@@ -1346,11 +1346,11 @@ LRESULT ChromeActiveDocument::OnFirePrivacyChange(UINT message, WPARAM wparam,
return 0;
}
- ScopedComPtr<IShellBrowser> shell_browser;
+ base::win::ScopedComPtr<IShellBrowser> shell_browser;
DoQueryService(SID_STopLevelBrowser, web_browser2,
shell_browser.Receive());
DCHECK(shell_browser.get() != NULL);
- ScopedComPtr<ITridentService2> trident_services;
+ base::win::ScopedComPtr<ITridentService2> trident_services;
trident_services.QueryFrom(shell_browser);
if (trident_services)
trident_services->FirePrivacyImpactedStateChange(wparam);
diff --git a/chrome_frame/chrome_active_document.h b/chrome_frame/chrome_active_document.h
index d9e4f73..a720f23 100644
--- a/chrome_frame/chrome_active_document.h
+++ b/chrome_frame/chrome_active_document.h
@@ -16,18 +16,18 @@
#include <string>
#include "base/memory/scoped_ptr.h"
-#include "base/scoped_comptr_win.h"
#include "base/threading/thread.h"
+#include "base/win/scoped_comptr.h"
#include "chrome_frame/chrome_frame_activex_base.h"
#include "chrome_frame/com_type_info_holder.h"
+#include "chrome_frame/extra_system_apis.h"
#include "chrome_frame/find_dialog.h"
#include "chrome_frame/html_private_window_impl.h"
#include "chrome_frame/html_window_impl.h"
#include "chrome_frame/in_place_menu.h"
#include "chrome_frame/ole_document_impl.h"
#include "chrome_frame/resource.h"
-#include "chrome_frame/extra_system_apis.h"
#include "chrome_frame/utils.h"
class Thread;
@@ -467,7 +467,7 @@ END_EXEC_COMMAND_MAP()
// a new ChromeActiveDocument instance is taking its place.
bool is_automation_client_reused_;
- ScopedComPtr<INewWindowManager> popup_manager_;
+ base::win::ScopedComPtr<INewWindowManager> popup_manager_;
bool popup_allowed_;
HACCEL accelerator_table_;
diff --git a/chrome_frame/chrome_frame_activex.cc b/chrome_frame/chrome_frame_activex.cc
index eb1eb79..62bae43 100644
--- a/chrome_frame/chrome_frame_activex.cc
+++ b/chrome_frame/chrome_frame_activex.cc
@@ -27,8 +27,8 @@
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/test/automation/tab_proxy.h"
-#include "googleurl/src/gurl.h"
#include "chrome_frame/utils.h"
+#include "googleurl/src/gurl.h"
namespace {
@@ -198,7 +198,7 @@ LRESULT ChromeFrameActivex::OnHostMoved(UINT message, WPARAM wparam,
}
HRESULT ChromeFrameActivex::GetContainingDocument(IHTMLDocument2** doc) {
- ScopedComPtr<IOleContainer> container;
+ base::win::ScopedComPtr<IOleContainer> container;
HRESULT hr = m_spClientSite->GetContainer(container.Receive());
if (container)
hr = container.QueryInterface(doc);
@@ -206,7 +206,7 @@ HRESULT ChromeFrameActivex::GetContainingDocument(IHTMLDocument2** doc) {
}
HRESULT ChromeFrameActivex::GetDocumentWindow(IHTMLWindow2** window) {
- ScopedComPtr<IHTMLDocument2> document;
+ base::win::ScopedComPtr<IHTMLDocument2> document;
HRESULT hr = GetContainingDocument(document.Receive());
if (document)
hr = document->get_parentWindow(window);
@@ -214,7 +214,7 @@ HRESULT ChromeFrameActivex::GetDocumentWindow(IHTMLWindow2** window) {
}
void ChromeFrameActivex::OnLoad(const GURL& gurl) {
- ScopedComPtr<IDispatch> event;
+ base::win::ScopedComPtr<IDispatch> event;
std::string url = gurl.spec();
if (SUCCEEDED(CreateDomEvent("event", url, "", event.Receive())))
Fire_onload(event);
@@ -224,7 +224,7 @@ void ChromeFrameActivex::OnLoad(const GURL& gurl) {
}
void ChromeFrameActivex::OnLoadFailed(int error_code, const std::string& url) {
- ScopedComPtr<IDispatch> event;
+ base::win::ScopedComPtr<IDispatch> event;
if (SUCCEEDED(CreateDomEvent("event", url, "", event.Receive())))
Fire_onloaderror(event);
@@ -242,7 +242,7 @@ void ChromeFrameActivex::OnMessageFromChromeFrame(const std::string& message,
if (is_privileged()) {
// Forward messages if the control is in privileged mode.
- ScopedComPtr<IDispatch> message_event;
+ base::win::ScopedComPtr<IDispatch> message_event;
if (SUCCEEDED(CreateDomEvent("message", message, origin,
message_event.Receive()))) {
base::win::ScopedBstr target_bstr(UTF8ToWide(target).c_str());
@@ -263,7 +263,7 @@ void ChromeFrameActivex::OnMessageFromChromeFrame(const std::string& message,
return;
}
- ScopedComPtr<IDispatch> message_event;
+ base::win::ScopedComPtr<IDispatch> message_event;
if (SUCCEEDED(CreateDomEvent("message", message, origin,
message_event.Receive()))) {
Fire_onmessage(message_event);
@@ -284,7 +284,7 @@ bool ChromeFrameActivex::ShouldShowVersionMismatchDialog(
}
if (client_site) {
- ScopedComPtr<IChromeFramePrivileged> service;
+ base::win::ScopedComPtr<IChromeFramePrivileged> service;
HRESULT hr = DoQueryService(SID_ChromeFramePrivileged,
client_site,
service.Receive());
@@ -346,7 +346,7 @@ STDMETHODIMP ChromeFrameActivex::Load(IPropertyBag* bag, IErrorLog* error_log) {
base::win::ScopedBstr object_id;
GetObjectScriptId(obj_element, object_id.Receive());
- ScopedComPtr<IHTMLElement2> element;
+ base::win::ScopedComPtr<IHTMLElement2> element;
element.QueryFrom(obj_element);
HRESULT hr = S_OK;
@@ -431,7 +431,7 @@ HRESULT ChromeFrameActivex::IOleObject_SetClientSite(
// Drop privileged mode on uninitialization.
set_is_privileged(false);
} else {
- ScopedComPtr<IHTMLDocument2> document;
+ base::win::ScopedComPtr<IHTMLDocument2> document;
GetContainingDocument(document.Receive());
if (document) {
base::win::ScopedBstr url;
@@ -440,7 +440,7 @@ HRESULT ChromeFrameActivex::IOleObject_SetClientSite(
}
// Probe to see whether the host implements the privileged service.
- ScopedComPtr<IChromeFramePrivileged> service;
+ base::win::ScopedComPtr<IChromeFramePrivileged> service;
HRESULT service_hr = DoQueryService(SID_ChromeFramePrivileged,
m_spClientSite,
service.Receive());
@@ -502,7 +502,7 @@ HRESULT ChromeFrameActivex::GetObjectScriptId(IHTMLObjectElement* object_elem,
HRESULT hr = E_FAIL;
if (object_elem) {
- ScopedComPtr<IHTMLElement> elem;
+ base::win::ScopedComPtr<IHTMLElement> elem;
hr = elem.QueryFrom(object_elem);
if (elem) {
hr = elem->get_id(id);
@@ -517,10 +517,10 @@ HRESULT ChromeFrameActivex::GetObjectElement(IHTMLObjectElement** element) {
if (!m_spClientSite)
return E_UNEXPECTED;
- ScopedComPtr<IOleControlSite> site;
+ base::win::ScopedComPtr<IOleControlSite> site;
HRESULT hr = site.QueryFrom(m_spClientSite);
if (site) {
- ScopedComPtr<IDispatch> disp;
+ base::win::ScopedComPtr<IDispatch> disp;
hr = site->GetExtendedControl(disp.Receive());
if (disp) {
hr = disp.QueryInterface(element);
@@ -545,14 +545,14 @@ HRESULT ChromeFrameActivex::CreateScriptBlockForEvent(
return E_INVALIDARG;
}
- ScopedComPtr<IHTMLDocument2> document;
+ base::win::ScopedComPtr<IHTMLDocument2> document;
HRESULT hr = GetContainingDocument(document.Receive());
if (SUCCEEDED(hr)) {
- ScopedComPtr<IHTMLElement> element, new_element;
+ base::win::ScopedComPtr<IHTMLElement> element, new_element;
document->createElement(base::win::ScopedBstr(L"script"),
element.Receive());
if (element) {
- ScopedComPtr<IHTMLScriptElement> script_element;
+ base::win::ScopedComPtr<IHTMLScriptElement> script_element;
if (SUCCEEDED(hr = script_element.QueryFrom(element))) {
script_element->put_htmlFor(instance_id);
script_element->put_event(event_name);
@@ -572,7 +572,7 @@ HRESULT ChromeFrameActivex::CreateScriptBlockForEvent(
void ChromeFrameActivex::FireEvent(const EventHandlers& handlers,
const std::string& arg) {
if (handlers.size()) {
- ScopedComPtr<IDispatch> event;
+ base::win::ScopedComPtr<IDispatch> event;
if (SUCCEEDED(CreateDomEvent("event", arg, "", event.Receive()))) {
FireEvent(handlers, event);
}
@@ -621,7 +621,7 @@ void ChromeFrameActivex::FireEvent(const EventHandlers& handlers,
HRESULT ChromeFrameActivex::InstallTopLevelHook(IOleClientSite* client_site) {
// Get the parent window of the site, and install our hook on the topmost
// window of the parent.
- ScopedComPtr<IOleWindow> ole_window;
+ base::win::ScopedComPtr<IOleWindow> ole_window;
HRESULT hr = ole_window.QueryFrom(client_site);
if (FAILED(hr))
return hr;
@@ -650,7 +650,7 @@ HRESULT ChromeFrameActivex::registerBhoIfNeeded() {
return S_OK;
}
- ScopedComPtr<IWebBrowser2> web_browser2;
+ base::win::ScopedComPtr<IWebBrowser2> web_browser2;
HRESULT hr = DoQueryService(SID_SWebBrowserApp, m_spUnkSite,
web_browser2.Receive());
if (FAILED(hr) || web_browser2.get() == NULL) {
@@ -663,7 +663,7 @@ HRESULT ChromeFrameActivex::registerBhoIfNeeded() {
StringFromGUID2(CLSID_ChromeFrameBHO, bho_class_id_as_string,
arraysize(bho_class_id_as_string));
- ScopedComPtr<IObjectWithSite> bho;
+ base::win::ScopedComPtr<IObjectWithSite> bho;
hr = bho.CreateInstance(CLSID_ChromeFrameBHO, NULL, CLSCTX_INPROC_SERVER);
if (FAILED(hr)) {
NOTREACHED() << "Failed to register ChromeFrame BHO. Error:"
diff --git a/chrome_frame/chrome_frame_automation.h b/chrome_frame/chrome_frame_automation.h
index 18494c3..eed2983 100644
--- a/chrome_frame/chrome_frame_automation.h
+++ b/chrome_frame/chrome_frame_automation.h
@@ -7,8 +7,8 @@
#include <atlbase.h>
#include <atlwin.h>
-#include <string>
#include <map>
+#include <string>
#include <vector>
#include "base/memory/ref_counted.h"
@@ -528,7 +528,7 @@ class ChromeFrameAutomationClient
scoped_refptr<ChromeFrameLaunchParams> chrome_launch_params_;
// Cache security manager for URL zone checking
- ScopedComPtr<IInternetSecurityManager> security_manager_;
+ base::win::ScopedComPtr<IInternetSecurityManager> security_manager_;
// When host network stack is used, this object is in charge of
// handling network requests.
diff --git a/chrome_frame/com_message_event.cc b/chrome_frame/com_message_event.cc
index 8535999..32f1fc6 100644
--- a/chrome_frame/com_message_event.cc
+++ b/chrome_frame/com_message_event.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -25,15 +25,15 @@ bool ComMessageEvent::Initialize(IOleContainer* container,
type_ = event_type;
// May remain NULL if container not IE
- ScopedComPtr<IHTMLEventObj> basic_event;
- ScopedComPtr<IHTMLDocument2> doc;
+ base::win::ScopedComPtr<IHTMLEventObj> basic_event;
+ base::win::ScopedComPtr<IHTMLDocument2> doc;
// Fetching doc may fail in non-IE containers
// and container might be NULL in some applications.
if (container)
container->QueryInterface(doc.Receive());
if (doc) {
- ScopedComPtr<IHTMLDocument4> doc4;
+ base::win::ScopedComPtr<IHTMLDocument4> doc4;
doc4.QueryFrom(doc);
DCHECK(doc4); // supported by IE5.5 and higher
if (doc4) {
diff --git a/chrome_frame/com_message_event.h b/chrome_frame/com_message_event.h
index 86fec2d..39900e9 100644
--- a/chrome_frame/com_message_event.h
+++ b/chrome_frame/com_message_event.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -8,8 +8,9 @@
#include <atlbase.h>
#include <atlcom.h>
#include <mshtml.h> // IHTMLEventObj
+
#include "base/basictypes.h"
-#include "base/scoped_comptr_win.h"
+#include "base/win/scoped_comptr.h"
// Implements a MessageEvent compliant event object by providing MessageEvent
// specific properties itself and inherited properties from a browser provided
@@ -63,7 +64,7 @@ END_COM_MAP()
// calls that we do not directly support. This may not be initialized
// if our container does not require the properties/methods exposed by
// the basic event object.
- ScopedComPtr<IHTMLEventObj> basic_event_;
+ base::win::ScopedComPtr<IHTMLEventObj> basic_event_;
std::string message_;
std::string origin_;
std::string type_;
diff --git a/chrome_frame/com_type_info_holder.cc b/chrome_frame/com_type_info_holder.cc
index 695d61e..aa9b13b 100644
--- a/chrome_frame/com_type_info_holder.cc
+++ b/chrome_frame/com_type_info_holder.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -62,7 +62,7 @@ HRESULT TypeInfoNameCache::Initialize(const IID& iid) {
return E_UNEXPECTED;
}
- ScopedComPtr<ITypeLib> type_lib;
+ base::win::ScopedComPtr<ITypeLib> type_lib;
HRESULT hr = LoadTypeLib(file_path, type_lib.Receive());
if (SUCCEEDED(hr)) {
hr = type_lib->GetTypeInfoOfGuid(iid, type_info_.Receive());
diff --git a/chrome_frame/com_type_info_holder.h b/chrome_frame/com_type_info_holder.h
index bf476a5..a777d7c 100644
--- a/chrome_frame/com_type_info_holder.h
+++ b/chrome_frame/com_type_info_holder.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -8,8 +8,8 @@
#include <map>
#include <ocidl.h> // IProvideClassInfo2
-#include "base/scoped_comptr_win.h"
#include "base/synchronization/lock.h"
+#include "base/win/scoped_comptr.h"
#define NO_VTABLE __declspec(novtable)
@@ -60,7 +60,7 @@ class TypeInfoNameCache {
}
protected:
- ScopedComPtr<ITypeInfo> type_info_;
+ base::win::ScopedComPtr<ITypeInfo> type_info_;
NameToDispIdCache cache_;
};
@@ -140,8 +140,8 @@ template <class T, const IID& iid = __uuidof(T)>
class NO_VTABLE IDispatchImpl : public T {
public:
STDMETHOD(GetTypeInfoCount)(UINT* count) {
- if (count == NULL)
- return E_POINTER;
+ if (count == NULL)
+ return E_POINTER;
*count = 1;
return S_OK;
}
@@ -174,7 +174,7 @@ class NO_VTABLE IProvideClassInfo2Impl : public IProvideClassInfo2 {
}
STDMETHOD(GetGUID)(DWORD guid_kind, GUID* guid) {
- if(guid == NULL || guid_kind != GUIDKIND_DEFAULT_SOURCE_DISP_IID)
+ if (guid == NULL || guid_kind != GUIDKIND_DEFAULT_SOURCE_DISP_IID)
return E_INVALIDARG;
*guid = source_iid;
diff --git a/chrome_frame/external_tab.h b/chrome_frame/external_tab.h
index 36b3e3d..ab10614 100644
--- a/chrome_frame/external_tab.h
+++ b/chrome_frame/external_tab.h
@@ -9,11 +9,13 @@
#include <windows.h>
#include <atlbase.h>
#include <atlwin.h>
-#include <vector>
+
#include <string>
+#include <vector>
+
#include "base/memory/scoped_ptr.h"
-#include "base/scoped_comptr_win.h"
#include "base/time.h"
+#include "base/win/scoped_comptr.h"
#include "chrome/common/automation_constants.h"
#include "chrome_frame/cfproxy.h"
#include "chrome_frame/task_marshaller.h"
diff --git a/chrome_frame/http_negotiate.cc b/chrome_frame/http_negotiate.cc
index 0bff64b..7ca3cea 100644
--- a/chrome_frame/http_negotiate.cc
+++ b/chrome_frame/http_negotiate.cc
@@ -16,8 +16,8 @@
#include "chrome_frame/bho.h"
#include "chrome_frame/exception_barrier.h"
#include "chrome_frame/html_utils.h"
-#include "chrome_frame/urlmon_url_request.h"
#include "chrome_frame/urlmon_moniker.h"
+#include "chrome_frame/urlmon_url_request.h"
#include "chrome_frame/utils.h"
#include "chrome_frame/vtable_patch_manager.h"
#include "net/http/http_response_headers.h"
@@ -172,11 +172,11 @@ bool HttpNegotiatePatch::Initialize() {
// Use our SimpleBindStatusCallback class as we need a temporary object that
// implements IBindStatusCallback.
CComObjectStackEx<SimpleBindStatusCallback> request;
- ScopedComPtr<IBindCtx> bind_ctx;
+ base::win::ScopedComPtr<IBindCtx> bind_ctx;
HRESULT hr = CreateAsyncBindCtx(0, &request, NULL, bind_ctx.Receive());
DCHECK(SUCCEEDED(hr)) << "CreateAsyncBindCtx";
if (bind_ctx) {
- ScopedComPtr<IUnknown> bscb_holder;
+ base::win::ScopedComPtr<IUnknown> bscb_holder;
bind_ctx->GetObjectParam(L"_BSCB_Holder_", bscb_holder.Receive());
if (bscb_holder) {
hr = PatchHttpNegotiate(bscb_holder);
@@ -200,7 +200,7 @@ HRESULT HttpNegotiatePatch::PatchHttpNegotiate(IUnknown* to_patch) {
DCHECK(to_patch);
DCHECK_IS_NOT_PATCHED(IHttpNegotiate);
- ScopedComPtr<IHttpNegotiate> http;
+ base::win::ScopedComPtr<IHttpNegotiate> http;
HRESULT hr = http.QueryFrom(to_patch);
if (FAILED(hr)) {
hr = DoQueryService(IID_IHttpNegotiate, to_patch, http.Receive());
diff --git a/chrome_frame/http_negotiate.h b/chrome_frame/http_negotiate.h
index 70a3ca2..e21d74e 100644
--- a/chrome_frame/http_negotiate.h
+++ b/chrome_frame/http_negotiate.h
@@ -11,7 +11,7 @@
#include <string>
#include "base/basictypes.h"
-#include "base/scoped_comptr_win.h"
+#include "base/win/scoped_comptr.h"
// Typedefs for IHttpNegotiate methods.
typedef HRESULT (STDMETHODCALLTYPE* IHttpNegotiate_BeginningTransaction_Fn)(
diff --git a/chrome_frame/in_place_menu.h b/chrome_frame/in_place_menu.h
index d6b368a..76e9d75 100644
--- a/chrome_frame/in_place_menu.h
+++ b/chrome_frame/in_place_menu.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -22,7 +22,7 @@
// Active Template Library product.
#include "base/logging.h"
-#include "base/scoped_comptr_win.h"
+#include "base/win/scoped_comptr.h"
template <class T>
class InPlaceMenu {
@@ -42,7 +42,7 @@ class InPlaceMenu {
if (ole_menu_ || shared_menu_)
return S_OK;
- ScopedComPtr<IOleInPlaceFrame> in_place_frame;
+ base::win::ScopedComPtr<IOleInPlaceFrame> in_place_frame;
GetInPlaceFrame(in_place_frame.Receive());
// We have no IOleInPlaceFrame, no menu merging possible
if (!in_place_frame) {
@@ -70,7 +70,7 @@ class InPlaceMenu {
}
HRESULT InPlaceMenuDestroy() {
- ScopedComPtr<IOleInPlaceFrame> in_place_frame;
+ base::win::ScopedComPtr<IOleInPlaceFrame> in_place_frame;
GetInPlaceFrame(in_place_frame.Receive());
if (in_place_frame) {
in_place_frame->RemoveMenus(shared_menu_);
@@ -177,7 +177,7 @@ class InPlaceMenu {
// we'll have to get it ourselves.
if (t->m_spInPlaceSite) {
t->frame_info_.cb = sizeof(OLEINPLACEFRAMEINFO);
- ScopedComPtr<IOleInPlaceUIWindow> in_place_ui_window;
+ base::win::ScopedComPtr<IOleInPlaceUIWindow> in_place_ui_window;
RECT position_rect = {0};
RECT clip_rect = {0};
hr = t->m_spInPlaceSite->GetWindowContext(in_place_frame,
diff --git a/chrome_frame/plugin_url_request.h b/chrome_frame/plugin_url_request.h
index e74a589..879620c 100644
--- a/chrome_frame/plugin_url_request.h
+++ b/chrome_frame/plugin_url_request.h
@@ -9,8 +9,8 @@
#include <vector>
#include "base/memory/ref_counted.h"
-#include "base/scoped_comptr_win.h"
#include "base/time.h"
+#include "base/win/scoped_comptr.h"
#include "chrome_frame/chrome_frame_delegate.h"
#include "chrome_frame/urlmon_upload_data_stream.h"
#include "ipc/ipc_message.h"
@@ -186,7 +186,7 @@ class PluginUrlRequest {
std::string extra_headers_;
ResourceType::Type resource_type_;
int load_flags_;
- ScopedComPtr<IStream> upload_data_;
+ base::win::ScopedComPtr<IStream> upload_data_;
bool is_chunked_upload_;
// Contains the ip address and port of the destination host.
net::HostPortPair socket_address_;
diff --git a/chrome_frame/protocol_sink_wrap.cc b/chrome_frame/protocol_sink_wrap.cc
index 91d77dc..4ceeb62 100644
--- a/chrome_frame/protocol_sink_wrap.cc
+++ b/chrome_frame/protocol_sink_wrap.cc
@@ -96,7 +96,7 @@ ProtocolSinkWrap::~ProtocolSinkWrap() {
DVLOG(1) << __FUNCTION__ << base::StringPrintf(" 0x%08X", this);
}
-ScopedComPtr<IInternetProtocolSink> ProtocolSinkWrap::CreateNewSink(
+base::win::ScopedComPtr<IInternetProtocolSink> ProtocolSinkWrap::CreateNewSink(
IInternetProtocolSink* sink, ProtData* data) {
DCHECK(sink != NULL);
DCHECK(data != NULL);
@@ -104,7 +104,7 @@ ScopedComPtr<IInternetProtocolSink> ProtocolSinkWrap::CreateNewSink(
CComObject<ProtocolSinkWrap>::CreateInstance(&new_sink);
new_sink->delegate_ = sink;
new_sink->prot_data_ = data;
- return ScopedComPtr<IInternetProtocolSink>(new_sink);
+ return base::win::ScopedComPtr<IInternetProtocolSink>(new_sink);
}
// IInternetProtocolSink methods
@@ -147,10 +147,11 @@ STDMETHODIMP ProtocolSinkWrap::ReportResult(HRESULT result, DWORD error,
// Helpers
-ScopedComPtr<IBindCtx> BindCtxFromIBindInfo(IInternetBindInfo* bind_info) {
+base::win::ScopedComPtr<IBindCtx> BindCtxFromIBindInfo(
+ IInternetBindInfo* bind_info) {
LPOLESTR bind_ctx_string = NULL;
ULONG count;
- ScopedComPtr<IBindCtx> bind_ctx;
+ base::win::ScopedComPtr<IBindCtx> bind_ctx;
bind_info->GetBindString(BINDSTRING_PTR_BIND_CONTEXT, &bind_ctx_string, 1,
&count);
if (bind_ctx_string) {
@@ -176,7 +177,7 @@ bool ShouldWrapSink(IInternetProtocolSink* sink, const wchar_t* url) {
if ((url != StrStrW(url, L"http://")) && (url != StrStrW(url, L"https://")))
return false;
- ScopedComPtr<IHttpNegotiate> http_negotiate;
+ base::win::ScopedComPtr<IHttpNegotiate> http_negotiate;
HRESULT hr = DoQueryService(GUID_NULL, sink, http_negotiate.Receive());
if (http_negotiate && !IsSubFrameRequest(http_negotiate))
return true;
@@ -186,7 +187,7 @@ bool ShouldWrapSink(IInternetProtocolSink* sink, const wchar_t* url) {
// High level helpers
bool IsCFRequest(IBindCtx* pbc) {
- ScopedComPtr<BindContextInfo> info;
+ base::win::ScopedComPtr<BindContextInfo> info;
BindContextInfo::FromBindContext(pbc, info.Receive());
if (info && info->chrome_request())
return true;
@@ -195,7 +196,7 @@ bool IsCFRequest(IBindCtx* pbc) {
}
bool HasProtData(IBindCtx* pbc) {
- ScopedComPtr<BindContextInfo> info;
+ base::win::ScopedComPtr<BindContextInfo> info;
BindContextInfo::FromBindContext(pbc, info.Receive());
bool result = false;
if (info)
@@ -207,7 +208,7 @@ void PutProtData(IBindCtx* pbc, ProtData* data) {
// AddRef and Release to avoid a potential leak of a ProtData instance if
// FromBindContext fails.
data->AddRef();
- ScopedComPtr<BindContextInfo> info;
+ base::win::ScopedComPtr<BindContextInfo> info;
BindContextInfo::FromBindContext(pbc, info.Receive());
if (info)
info->set_prot_data(data);
@@ -418,7 +419,7 @@ HRESULT ProtData::ReportProgress(IInternetProtocolSink* delegate,
// This may seem awkward. CBinding's implementation of IWinInetHttpInfo
// will forward to CTransaction that will forward to the real protocol.
// We may ask CTransaction (our protocol_ member) for IWinInetHttpInfo.
- ScopedComPtr<IWinInetHttpInfo> info;
+ base::win::ScopedComPtr<IWinInetHttpInfo> info;
info.QueryFrom(delegate);
renderer_type_ = DetermineRendererTypeFromMetaData(suggested_mime_type_,
url_, info);
@@ -552,7 +553,7 @@ void ProtData::FireSuggestedMimeType(IInternetProtocolSink* delegate) {
void ProtData::SaveReferrer(IInternetProtocolSink* delegate) {
DCHECK(IsChrome(renderer_type_));
- ScopedComPtr<IWinInetHttpInfo> info;
+ base::win::ScopedComPtr<IWinInetHttpInfo> info;
info.QueryFrom(delegate);
if (info) {
char buffer[4096] = {0};
@@ -644,7 +645,7 @@ STDMETHODIMP Hook_Start(InternetProtocol_Start_Fn orig_start,
return E_INVALIDARG;
DVLOG_IF(1, url != NULL) << "OnStart: " << url << PiFlags2Str(flags);
- ScopedComPtr<IBindCtx> bind_ctx = BindCtxFromIBindInfo(bind_info);
+ base::win::ScopedComPtr<IBindCtx> bind_ctx = BindCtxFromIBindInfo(bind_info);
if (!bind_ctx) {
// MSHTML sometimes takes a short path, skips the creation of
// moniker and binding, by directly grabbing protocol from InternetSession
@@ -664,7 +665,7 @@ STDMETHODIMP Hook_Start(InternetProtocol_Start_Fn orig_start,
}
if (IsCFRequest(bind_ctx)) {
- ScopedComPtr<BindContextInfo> info;
+ base::win::ScopedComPtr<BindContextInfo> info;
BindContextInfo::FromBindContext(bind_ctx, info.Receive());
DCHECK(info);
if (info) {
@@ -677,7 +678,7 @@ STDMETHODIMP Hook_Start(InternetProtocol_Start_Fn orig_start,
if (prot_data) {
DVLOG(1) << "Found existing ProtData!";
prot_data->UpdateUrl(url);
- ScopedComPtr<IInternetProtocolSink> new_sink =
+ base::win::ScopedComPtr<IInternetProtocolSink> new_sink =
ProtocolSinkWrap::CreateNewSink(prot_sink, prot_data);
return ForwardWrappedHookStart(orig_start, protocol, url, new_sink,
bind_info, flags, reserved);
@@ -694,7 +695,7 @@ STDMETHODIMP Hook_Start(InternetProtocol_Start_Fn orig_start,
prot_data = new ProtData(protocol, read_fun, url);
PutProtData(bind_ctx, prot_data);
- ScopedComPtr<IInternetProtocolSink> new_sink =
+ base::win::ScopedComPtr<IInternetProtocolSink> new_sink =
ProtocolSinkWrap::CreateNewSink(prot_sink, prot_data);
return ForwardWrappedHookStart(orig_start, protocol, url, new_sink, bind_info,
flags, reserved);
@@ -725,7 +726,7 @@ STDMETHODIMP Hook_StartEx(InternetProtocol_StartEx_Fn orig_start_ex,
uri->GetPropertyBSTR(Uri_PROPERTY_ABSOLUTE_URI, url.Receive(), 0);
DVLOG_IF(1, url != NULL) << "OnStartEx: " << url << PiFlags2Str(flags);
- ScopedComPtr<IBindCtx> bind_ctx = BindCtxFromIBindInfo(bind_info);
+ base::win::ScopedComPtr<IBindCtx> bind_ctx = BindCtxFromIBindInfo(bind_info);
if (!bind_ctx) {
// MSHTML sometimes takes a short path, skips the creation of
// moniker and binding, by directly grabbing protocol from InternetSession.
@@ -745,7 +746,7 @@ STDMETHODIMP Hook_StartEx(InternetProtocol_StartEx_Fn orig_start_ex,
}
if (IsCFRequest(bind_ctx)) {
- ScopedComPtr<BindContextInfo> info;
+ base::win::ScopedComPtr<BindContextInfo> info;
BindContextInfo::FromBindContext(bind_ctx, info.Receive());
DCHECK(info);
if (info) {
@@ -758,7 +759,7 @@ STDMETHODIMP Hook_StartEx(InternetProtocol_StartEx_Fn orig_start_ex,
if (prot_data) {
DVLOG(1) << "Found existing ProtData!";
prot_data->UpdateUrl(url);
- ScopedComPtr<IInternetProtocolSink> new_sink =
+ base::win::ScopedComPtr<IInternetProtocolSink> new_sink =
ProtocolSinkWrap::CreateNewSink(prot_sink, prot_data);
return ForwardWrappedHookStartEx(orig_start_ex, protocol, uri, new_sink,
bind_info, flags, reserved);
@@ -775,7 +776,7 @@ STDMETHODIMP Hook_StartEx(InternetProtocol_StartEx_Fn orig_start_ex,
prot_data = new ProtData(protocol, read_fun, url);
PutProtData(bind_ctx, prot_data);
- ScopedComPtr<IInternetProtocolSink> new_sink =
+ base::win::ScopedComPtr<IInternetProtocolSink> new_sink =
ProtocolSinkWrap::CreateNewSink(prot_sink, prot_data);
return ForwardWrappedHookStartEx(orig_start_ex, protocol, uri, new_sink,
bind_info, flags, reserved);
@@ -864,7 +865,7 @@ class FakeProtocol : public CComObjectRootEx<CComSingleThreadModel>,
STDMETHOD(LockRequest)(DWORD options) { return S_OK; }
STDMETHOD(UnlockRequest)() { return S_OK; }
- ScopedComPtr<IInternetProtocol> transaction_;
+ base::win::ScopedComPtr<IInternetProtocol> transaction_;
};
struct FakeFactory : public IClassFactory,
@@ -888,7 +889,7 @@ struct FakeFactory : public IClassFactory,
};
static void HookTransactionVtable(IInternetProtocol* p) {
- ScopedComPtr<IInternetProtocolEx> ex;
+ base::win::ScopedComPtr<IInternetProtocolEx> ex;
ex.QueryFrom(p);
HRESULT hr = vtable_patch::PatchInterfaceMethods(p, CTransaction_PatchInfo);
@@ -906,7 +907,7 @@ void TransactionHooks::InstallHooks() {
CComObjectStackEx<FakeProtocol> prot;
CComObjectStackEx<FakeFactory> factory;
factory.obj_ = &prot;
- ScopedComPtr<IInternetSession> session;
+ base::win::ScopedComPtr<IInternetSession> session;
HRESULT hr = ::CoInternetGetSession(0, session.Receive(), 0);
hr = session->RegisterNameSpace(&factory, CLSID_NULL, L"611", 0, 0, 0);
DLOG_IF(FATAL, FAILED(hr)) << "Failed to register namespace";
@@ -914,9 +915,9 @@ void TransactionHooks::InstallHooks() {
return;
do {
- ScopedComPtr<IMoniker> mk;
- ScopedComPtr<IBindCtx> bc;
- ScopedComPtr<IStream> stream;
+ base::win::ScopedComPtr<IMoniker> mk;
+ base::win::ScopedComPtr<IBindCtx> bc;
+ base::win::ScopedComPtr<IStream> stream;
hr = ::CreateAsyncBindCtxEx(0, 0, 0, 0, bc.Receive(), 0);
DLOG_IF(FATAL, FAILED(hr)) << "CreateAsyncBindCtxEx failed " << hr;
if (hr != S_OK)
diff --git a/chrome_frame/stream_impl.h b/chrome_frame/stream_impl.h
index 9cced3e..454bbb1 100644
--- a/chrome_frame/stream_impl.h
+++ b/chrome_frame/stream_impl.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -8,7 +8,7 @@
#include <atlbase.h>
#include <atlcom.h>
-#include "base/scoped_comptr_win.h"
+#include "base/win/scoped_comptr.h"
// A generic base class for IStream implementation. If provided
// with a delegate, it delegated calls to it otherwise can be
@@ -35,7 +35,7 @@ class StreamImpl : public IStream {
STDMETHOD(Clone)(IStream** stream);
protected:
- ScopedComPtr<IStream> delegate_;
+ base::win::ScopedComPtr<IStream> delegate_;
private:
DISALLOW_COPY_AND_ASSIGN(StreamImpl);
diff --git a/chrome_frame/test/chrome_frame_test_utils.cc b/chrome_frame/test/chrome_frame_test_utils.cc
index 216fe2f..a9e5e36 100644
--- a/chrome_frame/test/chrome_frame_test_utils.cc
+++ b/chrome_frame/test/chrome_frame_test_utils.cc
@@ -21,9 +21,9 @@
#include "base/win/registry.h"
#include "base/win/scoped_handle.h"
#include "base/win/windows_version.h"
-#include "chrome/common/chrome_switches.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_paths_internal.h"
+#include "chrome/common/chrome_switches.h"
#include "chrome_frame/utils.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/base/clipboard/clipboard.h"
@@ -242,7 +242,7 @@ base::ProcessHandle LaunchIE(const std::wstring& url) {
int CloseAllIEWindows() {
int ret = 0;
- ScopedComPtr<IShellWindows> windows;
+ base::win::ScopedComPtr<IShellWindows> windows;
HRESULT hr = ::CoCreateInstance(__uuidof(ShellWindows), NULL, CLSCTX_ALL,
IID_IShellWindows, reinterpret_cast<void**>(windows.Receive()));
DCHECK(SUCCEEDED(hr));
@@ -252,10 +252,10 @@ int CloseAllIEWindows() {
windows->get_Count(&count);
VARIANT i = { VT_I4 };
for (i.lVal = 0; i.lVal < count; ++i.lVal) {
- ScopedComPtr<IDispatch> folder;
+ base::win::ScopedComPtr<IDispatch> folder;
windows->Item(i, folder.Receive());
if (folder != NULL) {
- ScopedComPtr<IWebBrowser2> browser;
+ base::win::ScopedComPtr<IWebBrowser2> browser;
if (SUCCEEDED(browser.QueryFrom(folder))) {
bool is_ie = true;
HWND window = NULL;
@@ -383,7 +383,7 @@ HRESULT LaunchIEAsComServer(IWebBrowser2** web_browser) {
if (base::win::GetVersion() == base::win::VERSION_VISTA &&
GetInstalledIEVersion() == IE_7) {
// Create medium integrity browser that will launch IE broker.
- ScopedComPtr<IWebBrowser2> medium_integrity_browser;
+ base::win::ScopedComPtr<IWebBrowser2> medium_integrity_browser;
hr = medium_integrity_browser.CreateInstance(CLSID_InternetExplorer, NULL,
CLSCTX_LOCAL_SERVER);
if (FAILED(hr))
diff --git a/chrome_frame/test/chrome_frame_test_utils.h b/chrome_frame/test/chrome_frame_test_utils.h
index 781ba7f..3a44d04 100644
--- a/chrome_frame/test/chrome_frame_test_utils.h
+++ b/chrome_frame/test/chrome_frame_test_utils.h
@@ -17,11 +17,11 @@
#include "base/memory/scoped_ptr.h"
#include "base/message_loop.h"
#include "base/process_util.h"
-#include "base/scoped_comptr_win.h"
#include "base/win/registry.h"
+#include "base/win/scoped_comptr.h"
-#include "chrome_frame/test_utils.h"
#include "chrome_frame/test/simulate_input.h"
+#include "chrome_frame/test_utils.h"
#include "chrome_frame/utils.h"
// Include without path to make GYP build see it.
@@ -118,7 +118,7 @@ class HungCOMCallDetector
}
void TearDown() {
- ScopedComPtr<IMessageFilter> prev_filter;
+ base::win::ScopedComPtr<IMessageFilter> prev_filter;
CoRegisterMessageFilter(prev_filter_.get(), prev_filter.Receive());
DestroyWindow();
m_hWnd = NULL;
@@ -182,7 +182,7 @@ class HungCOMCallDetector
// used to detect if outgoing COM calls hung.
bool is_hung_;
- ScopedComPtr<IMessageFilter> prev_filter_;
+ base::win::ScopedComPtr<IMessageFilter> prev_filter_;
};
// MessageLoopForUI wrapper that runs only for a limited time.
diff --git a/chrome_frame/test/chrome_frame_ui_test_utils.cc b/chrome_frame/test/chrome_frame_ui_test_utils.cc
index 3fcff06..d1dbd67 100644
--- a/chrome_frame/test/chrome_frame_ui_test_utils.cc
+++ b/chrome_frame/test/chrome_frame_ui_test_utils.cc
@@ -37,7 +37,7 @@ AccObject::AccObject(IAccessible* accessible, int child_id)
: accessible_(accessible), child_id_(child_id) {
DCHECK(accessible);
if (child_id != CHILDID_SELF) {
- ScopedComPtr<IDispatch> dispatch;
+ base::win::ScopedComPtr<IDispatch> dispatch;
// This class does not support referring to a full MSAA object using the
// parent object and the child id.
HRESULT result = accessible_->get_accChild(child_id_, dispatch.Receive());
@@ -51,7 +51,7 @@ AccObject::AccObject(IAccessible* accessible, int child_id)
// static
AccObject* AccObject::CreateFromWindow(HWND hwnd) {
- ScopedComPtr<IAccessible> accessible;
+ base::win::ScopedComPtr<IAccessible> accessible;
::AccessibleObjectFromWindow(hwnd, OBJID_CLIENT,
IID_IAccessible, reinterpret_cast<void**>(accessible.Receive()));
if (accessible)
@@ -62,7 +62,7 @@ AccObject* AccObject::CreateFromWindow(HWND hwnd) {
// static
AccObject* AccObject::CreateFromEvent(HWND hwnd, LONG object_id,
LONG child_id) {
- ScopedComPtr<IAccessible> accessible;
+ base::win::ScopedComPtr<IAccessible> accessible;
base::win::ScopedVariant acc_child_id;
::AccessibleObjectFromEvent(hwnd, object_id, child_id, accessible.Receive(),
acc_child_id.Receive());
@@ -74,7 +74,7 @@ AccObject* AccObject::CreateFromEvent(HWND hwnd, LONG object_id,
// static
AccObject* AccObject::CreateFromDispatch(IDispatch* dispatch) {
if (dispatch) {
- ScopedComPtr<IAccessible> accessible;
+ base::win::ScopedComPtr<IAccessible> accessible;
accessible.QueryFrom(dispatch);
if (accessible)
return new AccObject(accessible);
@@ -84,7 +84,7 @@ AccObject* AccObject::CreateFromDispatch(IDispatch* dispatch) {
// static
AccObject* AccObject::CreateFromPoint(int x, int y) {
- ScopedComPtr<IAccessible> accessible;
+ base::win::ScopedComPtr<IAccessible> accessible;
base::win::ScopedVariant child_id;
POINT point = {x, y};
::AccessibleObjectFromPoint(point, accessible.Receive(), child_id.Receive());
@@ -253,7 +253,7 @@ bool AccObject::GetLocationInClient(gfx::Rect* client_location) {
AccObject* AccObject::GetParent() {
if (IsSimpleElement())
return new AccObject(accessible_);
- ScopedComPtr<IDispatch> dispatch;
+ base::win::ScopedComPtr<IDispatch> dispatch;
if (FAILED(accessible_->get_accParent(dispatch.Receive())))
return NULL;
return AccObject::CreateFromDispatch(dispatch.get());
@@ -388,7 +388,7 @@ bool AccObject::GetWindowClassName(std::wstring* class_name) {
bool AccObject::GetSelectionRange(int* start_offset, int* end_offset) {
DCHECK(start_offset);
DCHECK(end_offset);
- ScopedComPtr<IAccessibleText> accessible_text;
+ base::win::ScopedComPtr<IAccessibleText> accessible_text;
HRESULT hr = DoQueryService(IID_IAccessibleText,
accessible_,
accessible_text.Receive());
@@ -417,7 +417,7 @@ bool AccObject::GetSelectedText(std::wstring* text) {
int start = 0, end = 0;
if (!GetSelectionRange(&start, &end))
return false;
- ScopedComPtr<IAccessibleText> accessible_text;
+ base::win::ScopedComPtr<IAccessibleText> accessible_text;
HRESULT hr = DoQueryService(IID_IAccessibleText,
accessible_,
accessible_text.Receive());
@@ -499,7 +499,7 @@ AccObject* AccObject::CreateFromVariant(AccObject* object,
// possible, since this class operates under the assumption that if the
// child id is not CHILDID_SELF, the object is a simple element. See the
// DCHECK in the constructor.
- ScopedComPtr<IDispatch> dispatch;
+ base::win::ScopedComPtr<IDispatch> dispatch;
HRESULT result = accessible->get_accChild(variant,
dispatch.Receive());
if (result == S_FALSE || result == E_NOINTERFACE) {
diff --git a/chrome_frame/test/chrome_frame_ui_test_utils.h b/chrome_frame/test/chrome_frame_ui_test_utils.h
index 86ddf34..680195f 100644
--- a/chrome_frame/test/chrome_frame_ui_test_utils.h
+++ b/chrome_frame/test/chrome_frame_ui_test_utils.h
@@ -12,7 +12,7 @@
#include "base/file_path.h"
#include "base/memory/ref_counted.h"
-#include "base/scoped_comptr_win.h"
+#include "base/win/scoped_comptr.h"
#include "base/win/scoped_variant.h"
#include "chrome_frame/test/win_event_receiver.h"
@@ -173,7 +173,7 @@ class AccObject : public base::RefCounted<AccObject> {
// Helper method for posting mouse button messages.
bool PostMouseButtonMessages(int button_up, int button_down, int x, int y);
- ScopedComPtr<IAccessible> accessible_;
+ base::win::ScopedComPtr<IAccessible> accessible_;
base::win::ScopedVariant child_id_;
DISALLOW_COPY_AND_ASSIGN(AccObject);
diff --git a/chrome_frame/test/com_message_event_unittest.cc b/chrome_frame/test/com_message_event_unittest.cc
index 3494f68..bd8a1ab 100644
--- a/chrome_frame/test/com_message_event_unittest.cc
+++ b/chrome_frame/test/com_message_event_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -32,7 +32,7 @@ class ATL_NO_VTABLE MockDumbContainer :
STDMETHOD(EnumObjects)(DWORD, IEnumUnknown**) {
NOTREACHED();
return E_NOTIMPL;
- }
+ }
STDMETHOD(LockContainer)(BOOL) {
NOTREACHED();
return E_NOTIMPL;
@@ -42,12 +42,12 @@ class ATL_NO_VTABLE MockDumbContainer :
TEST(ComMessageEvent, WithDumbContainer) {
CComObject<MockDumbContainer>* container_obj = NULL;
CComObject<MockDumbContainer>::CreateInstance(&container_obj);
- ScopedComPtr<IOleContainer> container(container_obj);
+ base::win::ScopedComPtr<IOleContainer> container(container_obj);
EXPECT_FALSE(!container);
CComObject<FriendlyComMessageEvent>* event_obj = NULL;
CComObject<FriendlyComMessageEvent>::CreateInstance(&event_obj);
- ScopedComPtr<IUnknown> event_ref(event_obj);
+ base::win::ScopedComPtr<IUnknown> event_ref(event_obj);
bool result = event_obj->Initialize(container, "hi", "http://www.foo.com/",
"message");
@@ -279,14 +279,14 @@ class ATL_NO_VTABLE MockSmartContainer :
TEST(ComMessageEvent, WithSmartContainer) {
CComObject<MockSmartContainer>* container_obj = NULL;
CComObject<MockSmartContainer>::CreateInstance(&container_obj);
- ScopedComPtr<IOleContainer> container(container_obj);
+ base::win::ScopedComPtr<IOleContainer> container(container_obj);
EXPECT_FALSE(!container);
CComObject<FriendlyComMessageEvent>* event_obj = NULL;
CComObject<FriendlyComMessageEvent>::CreateInstance(&event_obj);
- ScopedComPtr<IUnknown> event_ref(event_obj);
+ base::win::ScopedComPtr<IUnknown> event_ref(event_obj);
- bool succeeded = event_obj->Initialize(container, "hi",
+ bool succeeded = event_obj->Initialize(container, "hi",
"http://www.foo.com/", "message");
EXPECT_TRUE(succeeded);
EXPECT_FALSE(!event_obj->basic_event());
diff --git a/chrome_frame/test/ie_event_sink.cc b/chrome_frame/test/ie_event_sink.cc
index 2efd012..1fd9d45 100644
--- a/chrome_frame/test/ie_event_sink.cc
+++ b/chrome_frame/test/ie_event_sink.cc
@@ -174,13 +174,13 @@ bool IEEventSink::IsCFRendering() {
DCHECK(web_browser2_);
if (web_browser2_) {
- ScopedComPtr<IDispatch> doc;
+ base::win::ScopedComPtr<IDispatch> doc;
web_browser2_->get_Document(doc.Receive());
if (doc) {
// Detect if CF is rendering based on whether the document is a
// ChromeActiveDocument. Detecting based on hwnd is problematic as
// the CF Active Document window may not have been created yet.
- ScopedComPtr<IChromeFrame> chrome_frame;
+ base::win::ScopedComPtr<IChromeFrame> chrome_frame;
chrome_frame.QueryFrom(doc);
return chrome_frame.get();
}
@@ -241,7 +241,7 @@ void IEEventSink::ExpectAddressBarUrl(
void IEEventSink::Exec(const GUID* cmd_group_guid, DWORD command_id,
DWORD cmd_exec_opt, VARIANT* in_args,
VARIANT* out_args) {
- ScopedComPtr<IOleCommandTarget> shell_browser_cmd_target;
+ base::win::ScopedComPtr<IOleCommandTarget> shell_browser_cmd_target;
DoQueryService(SID_STopLevelBrowser, web_browser2_,
shell_browser_cmd_target.Receive());
ASSERT_TRUE(NULL != shell_browser_cmd_target);
@@ -260,7 +260,7 @@ HWND IEEventSink::GetRendererWindow() {
HWND renderer_window = NULL;
if (IsCFRendering()) {
DCHECK(chrome_frame_);
- ScopedComPtr<IOleWindow> ole_window;
+ base::win::ScopedComPtr<IOleWindow> ole_window;
ole_window.QueryFrom(chrome_frame_);
EXPECT_TRUE(ole_window.get());
@@ -284,12 +284,12 @@ HWND IEEventSink::GetRendererWindow() {
}
} else {
DCHECK(web_browser2_);
- ScopedComPtr<IDispatch> doc;
+ base::win::ScopedComPtr<IDispatch> doc;
HRESULT hr = web_browser2_->get_Document(doc.Receive());
EXPECT_HRESULT_SUCCEEDED(hr);
EXPECT_TRUE(doc);
if (doc) {
- ScopedComPtr<IOleWindow> ole_window;
+ base::win::ScopedComPtr<IOleWindow> ole_window;
ole_window.QueryFrom(doc);
EXPECT_TRUE(ole_window);
if (ole_window) {
@@ -306,7 +306,7 @@ HWND IEEventSink::GetRendererWindowSafe() {
HWND renderer_window = NULL;
if (IsCFRendering()) {
DCHECK(chrome_frame_);
- ScopedComPtr<IOleWindow> ole_window;
+ base::win::ScopedComPtr<IOleWindow> ole_window;
ole_window.QueryFrom(chrome_frame_);
if (ole_window) {
@@ -325,10 +325,10 @@ HWND IEEventSink::GetRendererWindowSafe() {
}
} else {
DCHECK(web_browser2_);
- ScopedComPtr<IDispatch> doc;
+ base::win::ScopedComPtr<IDispatch> doc;
web_browser2_->get_Document(doc.Receive());
if (doc) {
- ScopedComPtr<IOleWindow> ole_window;
+ base::win::ScopedComPtr<IOleWindow> ole_window;
ole_window.QueryFrom(doc);
if (ole_window) {
ole_window->GetWindow(&renderer_window);
@@ -382,12 +382,12 @@ void IEEventSink::ConnectToChromeFrame() {
DCHECK(web_browser2_);
if (chrome_frame_.get())
return;
- ScopedComPtr<IShellBrowser> shell_browser;
+ base::win::ScopedComPtr<IShellBrowser> shell_browser;
DoQueryService(SID_STopLevelBrowser, web_browser2_,
shell_browser.Receive());
if (shell_browser) {
- ScopedComPtr<IShellView> shell_view;
+ base::win::ScopedComPtr<IShellView> shell_view;
shell_browser->QueryActiveShellView(shell_view.Receive());
if (shell_view) {
shell_view->GetItemObject(SVGIO_BACKGROUND, __uuidof(IChromeFrame),
@@ -410,7 +410,7 @@ void IEEventSink::DisconnectFromChromeFrame() {
// Use a local ref counted copy of the IChromeFrame interface as the
// outgoing calls could cause the interface to be deleted due to a message
// pump running in the context of the outgoing call.
- ScopedComPtr<IChromeFrame> chrome_frame(chrome_frame_);
+ base::win::ScopedComPtr<IChromeFrame> chrome_frame(chrome_frame_);
chrome_frame_.Release();
base::win::ScopedVariant dummy(static_cast<IDispatch*>(NULL));
chrome_frame->put_onmessage(dummy);
@@ -450,7 +450,7 @@ STDMETHODIMP_(void) IEEventSink::OnNewWindow2(IDispatch** dispatch,
// Since we need to listen on events on the new browser, we create one
// if needed.
if (!*dispatch) {
- ScopedComPtr<IDispatch> new_browser;
+ base::win::ScopedComPtr<IDispatch> new_browser;
HRESULT hr = new_browser.CreateInstance(CLSID_InternetExplorer, NULL,
CLSCTX_LOCAL_SERVER);
DCHECK(SUCCEEDED(hr) && new_browser);
@@ -528,7 +528,7 @@ STDMETHODIMP_(void) IEEventSink::OnNewWindow3(
// Since we need to listen on events on the new browser, we create one
// if needed.
if (!*dispatch) {
- ScopedComPtr<IDispatch> new_browser;
+ base::win::ScopedComPtr<IDispatch> new_browser;
HRESULT hr = new_browser.CreateInstance(CLSID_InternetExplorer, NULL,
CLSCTX_LOCAL_SERVER);
DCHECK(SUCCEEDED(hr) && new_browser);
diff --git a/chrome_frame/test/ie_event_sink.h b/chrome_frame/test/ie_event_sink.h
index 41672a7..1346e1c 100644
--- a/chrome_frame/test/ie_event_sink.h
+++ b/chrome_frame/test/ie_event_sink.h
@@ -10,10 +10,10 @@
#include <exdispid.h>
#include <string>
-#include "base/scoped_comptr_win.h"
+#include "base/win/scoped_comptr.h"
-#include "chrome_frame/test_utils.h"
#include "chrome_frame/test/simulate_input.h"
+#include "chrome_frame/test_utils.h"
// Include without path to make GYP build see it.
#include "chrome_tab.h" // NOLINT
@@ -233,8 +233,8 @@ END_SINK_MAP()
HRESULT OnLoadError(const VARIANT* param);
HRESULT OnMessage(const VARIANT* param);
- ScopedComPtr<IWebBrowser2> web_browser2_;
- ScopedComPtr<IChromeFrame> chrome_frame_;
+ base::win::ScopedComPtr<IWebBrowser2> web_browser2_;
+ base::win::ScopedComPtr<IChromeFrame> chrome_frame_;
DispCallback<IEEventSink> onmessage_;
DispCallback<IEEventSink> onloaderror_;
DispCallback<IEEventSink> onload_;
diff --git a/chrome_frame/test/mock_ie_event_sink_actions.h b/chrome_frame/test/mock_ie_event_sink_actions.h
index 58d7006..273517bf 100644
--- a/chrome_frame/test/mock_ie_event_sink_actions.h
+++ b/chrome_frame/test/mock_ie_event_sink_actions.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -52,7 +52,7 @@ ACTION_P3(DelayCloseBrowserMock, loop, delay, mock) {
}
ACTION_P2(ConnectDocPropNotifySink, mock, sink) {
- ScopedComPtr<IDispatch> document;
+ base::win::ScopedComPtr<IDispatch> document;
mock->event_sink()->web_browser2()->get_Document(document.Receive());
EXPECT_TRUE(document != NULL); // NOLINT
if (document) {
diff --git a/chrome_frame/test/mock_ie_event_sink_test.cc b/chrome_frame/test/mock_ie_event_sink_test.cc
index 99ccfc4..8eddc4c 100644
--- a/chrome_frame/test/mock_ie_event_sink_test.cc
+++ b/chrome_frame/test/mock_ie_event_sink_test.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -6,8 +6,8 @@
#include <sstream>
-#include "base/win/scoped_variant.h"
#include "base/utf_string_conversions.h"
+#include "base/win/scoped_variant.h"
#include "chrome_frame/test/mock_ie_event_sink_actions.h"
// Needed for CreateFunctor.
@@ -157,10 +157,10 @@ void MockIEEventSink::ExpectAnyNavigations() {
}
void MockIEEventSink::ExpectDocumentReadystate(int ready_state) {
- ScopedComPtr<IWebBrowser2> browser(event_sink_->web_browser2());
+ base::win::ScopedComPtr<IWebBrowser2> browser(event_sink_->web_browser2());
EXPECT_TRUE(browser != NULL);
if (browser) {
- ScopedComPtr<IDispatch> document;
+ base::win::ScopedComPtr<IDispatch> document;
browser->get_Document(document.Receive());
EXPECT_TRUE(document != NULL);
if (document) {
diff --git a/chrome_frame/test/mock_ie_event_sink_test.h b/chrome_frame/test/mock_ie_event_sink_test.h
index b40400d..cd9113b 100644
--- a/chrome_frame/test/mock_ie_event_sink_test.h
+++ b/chrome_frame/test/mock_ie_event_sink_test.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -203,7 +203,7 @@ class MockPropertyNotifySinkListener : public PropertyNotifySinkListener {
private:
CComObject<PropertyNotifySinkImpl>* sink_;
DWORD cookie_;
- ScopedComPtr<IUnknown> event_source_;
+ base::win::ScopedComPtr<IUnknown> event_source_;
};
// Allows tests to observe when processes exit.
diff --git a/chrome_frame/test/navigation_test.cc b/chrome_frame/test/navigation_test.cc
index 3dfa0ba..82385a5 100644
--- a/chrome_frame/test/navigation_test.cc
+++ b/chrome_frame/test/navigation_test.cc
@@ -1,11 +1,11 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <string>
-#include "base/scoped_comptr_win.h"
#include "base/test/test_file_util.h"
+#include "base/win/scoped_comptr.h"
#include "base/win/windows_version.h"
#include "chrome_frame/test/chrome_frame_test_utils.h"
#include "chrome_frame/test/chrome_frame_ui_test_utils.h"
@@ -277,7 +277,7 @@ TEST_P(FullTabNavigationTest, BackForwardAnchor) {
// dialog appears.
TEST_P(FullTabNavigationTest, RestrictedSite) {
// Add the server to restricted sites zone.
- ScopedComPtr<IInternetSecurityManager> security_manager;
+ base::win::ScopedComPtr<IInternetSecurityManager> security_manager;
HRESULT hr = security_manager.CreateInstance(CLSID_InternetSecurityManager);
ASSERT_HRESULT_SUCCEEDED(hr);
hr = security_manager->SetZoneMapping(URLZONE_UNTRUSTED,
diff --git a/chrome_frame/test/net/fake_external_tab.cc b/chrome_frame/test/net/fake_external_tab.cc
index bba43c8..a4bd592 100644
--- a/chrome_frame/test/net/fake_external_tab.cc
+++ b/chrome_frame/test/net/fake_external_tab.cc
@@ -16,14 +16,13 @@
#include "base/file_version_info.h"
#include "base/i18n/icu_util.h"
#include "base/path_service.h"
-#include "base/scoped_comptr_win.h"
#include "base/string_util.h"
#include "base/stringprintf.h"
#include "base/threading/platform_thread.h"
+#include "base/win/scoped_comptr.h"
#include "base/win/scoped_handle.h"
#include "chrome/browser/automation/automation_provider_list.h"
#include "chrome/browser/chrome_content_browser_client.h"
-#include "chrome/renderer/chrome_content_renderer_client.h"
#include "chrome/browser/prefs/browser_prefs.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/prefs/proxy_config_dictionary.h"
@@ -36,6 +35,7 @@
#include "chrome/common/chrome_paths_internal.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
+#include "chrome/renderer/chrome_content_renderer_client.h"
#include "chrome_frame/test/chrome_frame_test_utils.h"
#include "chrome_frame/test/net/test_automation_resource_message_filter.h"
#include "chrome_frame/test/simulate_input.h"
@@ -91,7 +91,7 @@ bool PromptAfterSetup() {
// #pragma comment(lib, "oleacc.lib")).
bool SetFocusToAccessibleWindow(HWND hwnd) {
bool ret = false;
- ScopedComPtr<IAccessible> acc;
+ base::win::ScopedComPtr<IAccessible> acc;
AccessibleObjectFromWindow(hwnd, OBJID_WINDOW, IID_IAccessible,
reinterpret_cast<void**>(acc.Receive()));
if (acc) {
diff --git a/chrome_frame/test/perf/silverlight.cc b/chrome_frame/test/perf/silverlight.cc
index d5d95df..6ce7a0e 100644
--- a/chrome_frame/test/perf/silverlight.cc
+++ b/chrome_frame/test/perf/silverlight.cc
@@ -1,10 +1,12 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+
#include <atlbase.h>
#include <atlwin.h>
#include <atlhost.h>
-#include "base/scoped_comptr_win.h"
+
+#include "base/win/scoped_comptr.h"
#include "chrome_frame/test/perf/chrome_frame_perftest.h"
interface IXcpControlDownloadCallback;
@@ -128,7 +130,7 @@ class SilverlightContainer :
return hr;
}
- ScopedComPtr<IAxWinHostWindow> host_;
+ base::win::ScopedComPtr<IAxWinHostWindow> host_;
};
// Create and in-place Silverlight control. Should be extended to do something
@@ -156,7 +158,7 @@ TEST(ChromeFramePerf, DISABLED_HostSilverlight) {
WS_OVERLAPPEDWINDOW | WS_VISIBLE | WS_CLIPCHILDREN | WS_CLIPSIBLINGS,
WS_EX_APPWINDOW | WS_EX_WINDOWEDGE);
EXPECT_TRUE(host.m_hWnd != NULL);
- ScopedComPtr<IDispatch> disp;
+ base::win::ScopedComPtr<IDispatch> disp;
HRESULT hr = host.QueryControl(disp.Receive());
EXPECT_HRESULT_SUCCEEDED(hr);
disp.Release();
diff --git a/chrome_frame/test/reliability/page_load_test.cc b/chrome_frame/test/reliability/page_load_test.cc
index e08817e..e001c76 100644
--- a/chrome_frame/test/reliability/page_load_test.cc
+++ b/chrome_frame/test/reliability/page_load_test.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
@@ -181,7 +181,7 @@ class PageLoadTest : public testing::Test {
chrome_frame_test::TimedMsgLoop message_loop;
// Launch IE.
- ScopedComPtr<IWebBrowser2> web_browser2;
+ base::win::ScopedComPtr<IWebBrowser2> web_browser2;
hr = chrome_frame_test::LaunchIEAsComServer(web_browser2.Receive());
EXPECT_HRESULT_SUCCEEDED(hr);
EXPECT_TRUE(web_browser2.get() != NULL);
diff --git a/chrome_frame/test/urlmon_moniker_integration_test.cc b/chrome_frame/test/urlmon_moniker_integration_test.cc
index 4bf977f..99c0357 100644
--- a/chrome_frame/test/urlmon_moniker_integration_test.cc
+++ b/chrome_frame/test/urlmon_moniker_integration_test.cc
@@ -5,13 +5,13 @@
#include <atlbase.h>
#include <atlcom.h>
-#include "base/scoped_comptr_win.h"
-#include "base/win/scoped_handle.h"
#include "base/threading/thread.h"
+#include "base/win/scoped_comptr.h"
+#include "base/win/scoped_handle.h"
#include "chrome_frame/bho.h"
//#include "chrome_frame/urlmon_moniker.h"
-#include "chrome_frame/test/test_server.h"
#include "chrome_frame/test/chrome_frame_test_utils.h"
+#include "chrome_frame/test/test_server.h"
#include "chrome_frame/test/urlmon_moniker_tests.h"
#include "gmock/gmock.h"
#include "gtest/gtest.h"
@@ -175,14 +175,14 @@ class UrlmonMonikerTestCallback {
HRESULT CreateUrlMonikerAndBindToStorage(const wchar_t* url,
IBindCtx** bind_ctx) {
- ScopedComPtr<IMoniker> moniker;
+ base::win::ScopedComPtr<IMoniker> moniker;
HRESULT hr = CreateURLMoniker(NULL, url, moniker.Receive());
EXPECT_TRUE(moniker != NULL);
if (moniker) {
- ScopedComPtr<IBindCtx> context;
+ base::win::ScopedComPtr<IBindCtx> context;
::CreateAsyncBindCtx(0, callback(), NULL, context.Receive());
DCHECK(context);
- ScopedComPtr<IStream> stream;
+ base::win::ScopedComPtr<IStream> stream;
hr = moniker->BindToStorage(context, NULL, IID_IStream,
reinterpret_cast<void**>(stream.Receive()));
if (SUCCEEDED(hr) && bind_ctx)
@@ -215,7 +215,7 @@ TEST_F(UrlmonMonikerTest, BindToStorageSynchronous) {
callback.SetCallbackExpectations(
UrlmonMonikerTestCallback::REQUEST_SYNCHRONOUS, S_OK, false);
- ScopedComPtr<IBindCtx> bind_ctx;
+ base::win::ScopedComPtr<IBindCtx> bind_ctx;
HRESULT hr = callback.CreateUrlMonikerAndBindToStorage(test_url,
bind_ctx.Receive());
// The download should have happened synchronously, so we don't expect
@@ -241,7 +241,7 @@ TEST_F(UrlmonMonikerTest, BindToStorageAsynchronous) {
callback.SetCallbackExpectations(
UrlmonMonikerTestCallback::REQUEST_ASYNCHRONOUS, S_OK, true);
- ScopedComPtr<IBindCtx> bind_ctx;
+ base::win::ScopedComPtr<IBindCtx> bind_ctx;
HRESULT hr = callback.CreateUrlMonikerAndBindToStorage(test_url,
bind_ctx.Receive());
EXPECT_EQ(MK_S_ASYNCHRONOUS, hr);
@@ -292,7 +292,7 @@ TEST_F(UrlmonMonikerTest, BindToStorageSwitchContent) {
if (request_data) {
EXPECT_EQ(request_data->GetCachedContentSize(),
arraysize(kTestContent) - 1);
- ScopedComPtr<IStream> stream;
+ base::win::ScopedComPtr<IStream> stream;
request_data->GetResetCachedContentStream(stream.Receive());
EXPECT_TRUE(stream != NULL);
if (stream) {
diff --git a/chrome_frame/test/urlmon_moniker_unittest.cc b/chrome_frame/test/urlmon_moniker_unittest.cc
index d644be7..f7e0f04 100644
--- a/chrome_frame/test/urlmon_moniker_unittest.cc
+++ b/chrome_frame/test/urlmon_moniker_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -7,10 +7,10 @@
#include "base/file_util.h"
#include "base/path_service.h"
-#include "base/scoped_comptr_win.h"
-#include "chrome_frame/urlmon_bind_status_callback.h"
+#include "base/win/scoped_comptr.h"
#include "chrome_frame/test/chrome_frame_test_utils.h"
#include "chrome_frame/test/urlmon_moniker_tests.h"
+#include "chrome_frame/urlmon_bind_status_callback.h"
using chrome_frame_test::ScopedVirtualizeHklmAndHkcu;
using testing::Return;
@@ -38,7 +38,7 @@ class MonikerPatchTest : public testing::Test {
static bool StringToStream(const std::string& data, IStream** ret) {
EXPECT_TRUE(!data.empty());
- ScopedComPtr<IStream> stream;
+ base::win::ScopedComPtr<IStream> stream;
HRESULT hr = CreateStreamOnHGlobal(NULL, TRUE, stream.Receive());
EXPECT_HRESULT_SUCCEEDED(hr);
if (FAILED(hr)) {
@@ -136,7 +136,7 @@ TEST_F(MonikerPatchTest, SniffDataMetaTag) {
ASSERT_TRUE(ReadFileAsString(kSmallHtmlMetaTag, &small_html_meta_tag));
ASSERT_TRUE(ReadFileAsString(kSmallHtmlNoMetaTag, &small_html_no_meta_tag));
- ScopedComPtr<IStream> stream_with_meta, stream_no_meta;
+ base::win::ScopedComPtr<IStream> stream_with_meta, stream_no_meta;
ASSERT_TRUE(StringToStream(small_html_meta_tag, stream_with_meta.Receive()));
ASSERT_TRUE(StringToStream(small_html_no_meta_tag,
stream_no_meta.Receive()));
@@ -159,7 +159,7 @@ TEST_F(MonikerPatchTest, SniffDataMetaTag) {
// case 1: callback reads data in 1 read
TEST_F(MonikerPatchTest, SniffDataPlayback1) {
std::string small_html_meta_tag;
- ScopedComPtr<IStream> stream_with_meta;
+ base::win::ScopedComPtr<IStream> stream_with_meta;
SniffData sniffer;
EXPECT_HRESULT_SUCCEEDED(sniffer.InitializeCache(std::wstring()));
@@ -202,7 +202,7 @@ TEST_F(MonikerPatchTest, SniffDataPlayback1) {
// case 2: callback reads data in 2 reads.
TEST_F(MonikerPatchTest, SniffDataPlayback2) {
std::string small_html_meta_tag;
- ScopedComPtr<IStream> stream_with_meta;
+ base::win::ScopedComPtr<IStream> stream_with_meta;
SniffData sniffer;
EXPECT_HRESULT_SUCCEEDED(sniffer.InitializeCache(std::wstring()));
diff --git a/chrome_frame/urlmon_bind_status_callback.cc b/chrome_frame/urlmon_bind_status_callback.cc
index f060155..d4633d1 100644
--- a/chrome_frame/urlmon_bind_status_callback.cc
+++ b/chrome_frame/urlmon_bind_status_callback.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -369,7 +369,7 @@ HRESULT BSCBStorageBind::MayPlayBack(DWORD flags) {
if (data_sniffer_.is_cache_valid()) {
if (data_sniffer_.is_chrome()) {
- ScopedComPtr<BindContextInfo> info;
+ base::win::ScopedComPtr<BindContextInfo> info;
BindContextInfo::FromBindContext(bind_ctx_, info.Receive());
DCHECK(info);
if (info) {
diff --git a/chrome_frame/urlmon_bind_status_callback.h b/chrome_frame/urlmon_bind_status_callback.h
index 8d8f4c4..dc31039 100644
--- a/chrome_frame/urlmon_bind_status_callback.h
+++ b/chrome_frame/urlmon_bind_status_callback.h
@@ -78,7 +78,7 @@ class SniffData {
return (size_ != 0);
}
- ScopedComPtr<IStream> cache_;
+ base::win::ScopedComPtr<IStream> cache_;
std::wstring url_;
RendererType renderer_type_;
size_t size_;
diff --git a/chrome_frame/urlmon_moniker.cc b/chrome_frame/urlmon_moniker.cc
index b7cc23d..12ce098 100644
--- a/chrome_frame/urlmon_moniker.cc
+++ b/chrome_frame/urlmon_moniker.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -11,8 +11,8 @@
#include "base/utf_string_conversions.h"
#include "chrome_frame/bho.h"
#include "chrome_frame/bind_context_info.h"
-#include "chrome_frame/exception_barrier.h"
#include "chrome_frame/chrome_active_document.h"
+#include "chrome_frame/exception_barrier.h"
#include "chrome_frame/urlmon_bind_status_callback.h"
#include "chrome_frame/utils.h"
#include "chrome_frame/vtable_patch_manager.h"
@@ -38,11 +38,11 @@ HRESULT NavigationManager::NavigateToCurrentUrlInCF(IBrowserService* browser) {
MarkBrowserOnThreadForCFNavigation(browser);
HRESULT hr = S_OK;
- ScopedComPtr<IShellBrowser> shell_browser;
- ScopedComPtr<IBindCtx> bind_context;
+ base::win::ScopedComPtr<IShellBrowser> shell_browser;
+ base::win::ScopedComPtr<IBindCtx> bind_context;
hr = ::CreateAsyncBindCtxEx(NULL, 0, NULL, NULL, bind_context.Receive(), 0);
- ScopedComPtr<IMoniker> moniker;
+ base::win::ScopedComPtr<IMoniker> moniker;
DCHECK(bind_context);
if (SUCCEEDED(hr) &&
SUCCEEDED(hr = ::CreateURLMonikerEx(NULL, url_.c_str(), moniker.Receive(),
@@ -100,7 +100,7 @@ bool MonikerPatch::Initialize() {
return true;
}
- ScopedComPtr<IMoniker> moniker;
+ base::win::ScopedComPtr<IMoniker> moniker;
HRESULT hr = ::CreateURLMoniker(NULL, L"http://localhost/",
moniker.Receive());
DCHECK(SUCCEEDED(hr));
@@ -133,7 +133,7 @@ bool ShouldWrapCallback(IMoniker* moniker, REFIID iid, IBindCtx* bind_context) {
return false;
}
- ScopedComPtr<BindContextInfo> info;
+ base::win::ScopedComPtr<BindContextInfo> info;
BindContextInfo::FromBindContext(bind_context, info.Receive());
DCHECK(info);
if (info && info->chrome_request()) {
@@ -152,10 +152,10 @@ bool ShouldWrapCallback(IMoniker* moniker, REFIID iid, IBindCtx* bind_context) {
// Check whether request comes from MSHTML by checking for IInternetBindInfo.
// We prefer to avoid wrapping if BindToStorage is called from AcroPDF.dll
// (as a result of OnObjectAvailable)
- ScopedComPtr<IUnknown> bscb_holder;
+ base::win::ScopedComPtr<IUnknown> bscb_holder;
if (S_OK == bind_context->GetObjectParam(L"_BSCB_Holder_",
bscb_holder.Receive())) {
- ScopedComPtr<IBindStatusCallback> bscb;
+ base::win::ScopedComPtr<IBindStatusCallback> bscb;
if (S_OK != DoQueryService(IID_IBindStatusCallback, bscb_holder,
bscb.Receive()))
return false;
@@ -163,7 +163,7 @@ bool ShouldWrapCallback(IMoniker* moniker, REFIID iid, IBindCtx* bind_context) {
if (!bscb.get())
return false;
- ScopedComPtr<IInternetBindInfo> bind_info;
+ base::win::ScopedComPtr<IInternetBindInfo> bind_info;
if (S_OK != bind_info.QueryFrom(bscb))
return false;
}
@@ -171,10 +171,10 @@ bool ShouldWrapCallback(IMoniker* moniker, REFIID iid, IBindCtx* bind_context) {
// TODO(ananta)
// Use the IsSubFrameRequest function to determine if a request is a top
// level request. Something like this.
- // ScopedComPtr<IUnknown> bscb_holder;
+ // base::win::ScopedComPtr<IUnknown> bscb_holder;
// bind_context->GetObjectParam(L"_BSCB_Holder_", bscb_holder.Receive());
// if (bscb_holder) {
- // ScopedComPtr<IHttpNegotiate> http_negotiate;
+ // base::win::ScopedComPtr<IHttpNegotiate> http_negotiate;
// http_negotiate.QueryFrom(bscb_holder);
// if (http_negotiate && !IsSubFrameRequest(http_negotiate))
// return true;
@@ -201,7 +201,7 @@ HRESULT MonikerPatch::BindToObject(IMoniker_BindToObject_Fn original,
HRESULT hr = S_OK;
// Bind context is marked for switch when we sniff data in BSCBStorageBind
// and determine that the renderer to be used is Chrome.
- ScopedComPtr<BindContextInfo> info;
+ base::win::ScopedComPtr<BindContextInfo> info;
BindContextInfo::FromBindContext(bind_ctx, info.Receive());
DCHECK(info);
if (info) {
diff --git a/chrome_frame/urlmon_upload_data_stream_unittest.cc b/chrome_frame/urlmon_upload_data_stream_unittest.cc
index efa8f1b..8bab45a 100644
--- a/chrome_frame/urlmon_upload_data_stream_unittest.cc
+++ b/chrome_frame/urlmon_upload_data_stream_unittest.cc
@@ -5,7 +5,7 @@
#include "gtest/gtest.h"
#include "base/memory/ref_counted.h"
-#include "base/scoped_comptr_win.h"
+#include "base/win/scoped_comptr.h"
#include "chrome_frame/urlmon_upload_data_stream.h"
TEST(UrlmonUploadDataStreamTest, TestBasicRead) {
@@ -20,7 +20,7 @@ TEST(UrlmonUploadDataStreamTest, TestBasicRead) {
ASSERT_TRUE(SUCCEEDED(hr));
upload_stream->Initialize(upload_data.get());
- ScopedComPtr<IStream> upload_istream(upload_stream);
+ base::win::ScopedComPtr<IStream> upload_istream(upload_stream);
char buffer[500];
memset(buffer, 0, 500);
@@ -55,7 +55,7 @@ TEST(UrlmonUploadDataStreamTest, TestBigRead) {
ASSERT_TRUE(SUCCEEDED(hr));
upload_stream->Initialize(upload_data.get());
- ScopedComPtr<IStream> upload_istream(upload_stream);
+ base::win::ScopedComPtr<IStream> upload_istream(upload_stream);
char big_rcv_buffer[kBigBufferLength];
int write_pos = 0;
@@ -89,7 +89,7 @@ TEST(UrlmonUploadDataStreamTest, TestStat) {
ASSERT_TRUE(SUCCEEDED(hr));
upload_stream->Initialize(upload_data.get());
- ScopedComPtr<IStream> upload_istream(upload_stream);
+ base::win::ScopedComPtr<IStream> upload_istream(upload_stream);
STATSTG statstg;
hr = upload_stream->Stat(&statstg, STATFLAG_NONAME);
@@ -110,7 +110,7 @@ TEST(UrlmonUploadDataStreamTest, TestRepeatedRead) {
ASSERT_TRUE(SUCCEEDED(hr));
upload_stream->Initialize(upload_data.get());
- ScopedComPtr<IStream> upload_istream(upload_stream);
+ base::win::ScopedComPtr<IStream> upload_istream(upload_stream);
char buffer[500];
memset(buffer, 0, 500);
@@ -145,7 +145,7 @@ TEST(UrlmonUploadDataStreamTest, TestZeroRead) {
ASSERT_TRUE(SUCCEEDED(hr));
upload_stream->Initialize(upload_data.get());
- ScopedComPtr<IStream> upload_istream(upload_stream);
+ base::win::ScopedComPtr<IStream> upload_istream(upload_stream);
char buffer[500];
memset(buffer, 0, 500);
diff --git a/chrome_frame/urlmon_url_request.cc b/chrome_frame/urlmon_url_request.cc
index 3af5833..a8cdec8 100644
--- a/chrome_frame/urlmon_url_request.cc
+++ b/chrome_frame/urlmon_url_request.cc
@@ -4,8 +4,8 @@
#include "chrome_frame/urlmon_url_request.h"
-#include <wininet.h>
#include <urlmon.h>
+#include <wininet.h>
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
@@ -14,14 +14,14 @@
#include "base/stringprintf.h"
#include "base/threading/platform_thread.h"
#include "base/utf_string_conversions.h"
+#include "chrome/common/automation_messages.h"
#include "chrome_frame/bind_context_info.h"
#include "chrome_frame/chrome_frame_activex_base.h"
#include "chrome_frame/extra_system_apis.h"
#include "chrome_frame/html_utils.h"
-#include "chrome_frame/urlmon_url_request_private.h"
#include "chrome_frame/urlmon_upload_data_stream.h"
+#include "chrome_frame/urlmon_url_request_private.h"
#include "chrome_frame/utils.h"
-#include "chrome/common/automation_messages.h"
#include "net/base/load_flags.h"
#include "net/http/http_response_headers.h"
#include "net/http/http_util.h"
@@ -185,7 +185,7 @@ void UrlmonUrlRequest::TerminateBind(TerminateBindCallback* callback) {
// should get E_PENDING back and then later we'll get that call
// to OnDataAvailable.
std::string data;
- ScopedComPtr<IStream> read_stream(pending_data_);
+ base::win::ScopedComPtr<IStream> read_stream(pending_data_);
HRESULT hr;
while ((hr = ReadStream(read_stream, 0xffff, &data)) == S_OK) {
// Just drop the data.
@@ -219,7 +219,7 @@ size_t UrlmonUrlRequest::SendDataToDelegate(size_t bytes_to_read) {
// where we can get a call to OnDataAvailable while inside Read and
// in our OnDataAvailable call, we can release the stream object
// while still using it.
- ScopedComPtr<IStream> pending(pending_data_);
+ base::win::ScopedComPtr<IStream> pending(pending_data_);
HRESULT hr = ReadStream(pending, bytes_to_read, &read_data);
if (read_data.empty())
pending_read_size_ = pending_data_read_save;
@@ -298,7 +298,7 @@ STDMETHODIMP UrlmonUrlRequest::OnProgress(ULONG progress, ULONG max_progress,
// If we receive a redirect for the initial pending request initiated
// when our document loads we should stash it away and inform Chrome
// accordingly when it requests data for the original URL.
- ScopedComPtr<BindContextInfo> info;
+ base::win::ScopedComPtr<BindContextInfo> info;
BindContextInfo::FromBindContext(bind_context_, info.Receive());
DCHECK(info);
GURL previously_redirected(info ? info->GetUrl() : std::wstring());
@@ -805,16 +805,16 @@ HRESULT UrlmonUrlRequest::StartAsyncDownload() {
}
if (SUCCEEDED(hr)) {
- ScopedComPtr<IStream> stream;
+ base::win::ScopedComPtr<IStream> stream;
// BindToStorage may complete synchronously.
// We still get all the callbacks - OnStart/StopBinding, this may result
// in destruction of our object. It's fine but we access some members
// below for debug info. :)
- ScopedComPtr<IHttpSecurity> self(this);
+ base::win::ScopedComPtr<IHttpSecurity> self(this);
// Inform our moniker patch this binding should not be tortured.
- ScopedComPtr<BindContextInfo> info;
+ base::win::ScopedComPtr<BindContextInfo> info;
BindContextInfo::FromBindContext(bind_context_, info.Receive());
DCHECK(info);
if (info)
@@ -871,7 +871,7 @@ void UrlmonUrlRequest::TerminateTransaction() {
// on this with the special flags 0x2000000 cleanly releases the
// transaction.
static const int kUrlmonTerminateTransactionFlags = 0x2000000;
- ScopedComPtr<BindContextInfo> info;
+ base::win::ScopedComPtr<BindContextInfo> info;
BindContextInfo::FromBindContext(bind_context_, info.Receive());
DCHECK(info);
if (info && info->protocol()) {
@@ -964,7 +964,7 @@ void UrlmonUrlRequestManager::SetInfoForUrl(const std::wstring& url,
DCHECK(start_url.is_valid());
DCHECK(pending_request_ == NULL);
- ScopedComPtr<BindContextInfo> info;
+ base::win::ScopedComPtr<BindContextInfo> info;
BindContextInfo::FromBindContext(bind_ctx, info.Receive());
DCHECK(info);
IStream* cache = info ? info->cache() : NULL;
diff --git a/chrome_frame/urlmon_url_request_private.h b/chrome_frame/urlmon_url_request_private.h
index 60ca118..498fb5d 100644
--- a/chrome_frame/urlmon_url_request_private.h
+++ b/chrome_frame/urlmon_url_request_private.h
@@ -228,11 +228,11 @@ class UrlmonUrlRequest
};
Status status_;
- ScopedComPtr<IBinding> binding_;
- ScopedComPtr<IMoniker> moniker_;
- ScopedComPtr<IBindCtx> bind_context_;
- ScopedComPtr<IStream> cache_;
- ScopedComPtr<IStream> pending_data_;
+ base::win::ScopedComPtr<IBinding> binding_;
+ base::win::ScopedComPtr<IMoniker> moniker_;
+ base::win::ScopedComPtr<IBindCtx> bind_context_;
+ base::win::ScopedComPtr<IStream> cache_;
+ base::win::ScopedComPtr<IStream> pending_data_;
size_t pending_read_size_;
base::PlatformThreadId thread_;
diff --git a/chrome_frame/utils.cc b/chrome_frame/utils.cc
index 1db94dc..69c4b31 100644
--- a/chrome_frame/utils.cc
+++ b/chrome_frame/utils.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -42,7 +42,6 @@
#include "chrome_tab.h" // NOLINT
using base::win::RegKey;
-using base::win::ScopedComPtr;
// Note that these values are all lower case and are compared to
// lower-case-transformed values.
@@ -467,7 +466,7 @@ FilePath GetIETemporaryFilesFolder() {
HRESULT hr = SHGetFolderLocation(NULL, CSIDL_INTERNET_CACHE, NULL,
SHGFP_TYPE_CURRENT, &tif_pidl);
if (SUCCEEDED(hr) && tif_pidl) {
- ScopedComPtr<IShellFolder> parent_folder;
+ base::win::ScopedComPtr<IShellFolder> parent_folder;
LPITEMIDLIST relative_pidl = NULL;
hr = SHBindToParent(tif_pidl, IID_IShellFolder,
reinterpret_cast<void**>(parent_folder.Receive()),
@@ -798,7 +797,7 @@ HRESULT NavigateBrowserToMoniker(IUnknown* browser, IMoniker* moniker,
DCHECK(moniker);
DCHECK(bind_ctx);
- ScopedComPtr<IWebBrowser2> web_browser2;
+ base::win::ScopedComPtr<IWebBrowser2> web_browser2;
HRESULT hr = DoQueryService(SID_SWebBrowserApp, browser,
web_browser2.Receive());
DCHECK(web_browser2);
@@ -862,7 +861,7 @@ HRESULT NavigateBrowserToMoniker(IUnknown* browser, IMoniker* moniker,
// HlinkSimpleNavigateToMoniker(moniker, url, NULL, host, bind_context,
// NULL, 0, 0);
- ScopedComPtr<IUriContainer> uri_container;
+ base::win::ScopedComPtr<IUriContainer> uri_container;
hr = uri_container.QueryFrom(moniker);
base::win::ScopedVariant headers_var;
@@ -878,7 +877,7 @@ HRESULT NavigateBrowserToMoniker(IUnknown* browser, IMoniker* moniker,
&IID_IWebBrowserPriv2IE8XPBeta,
};
- ScopedComPtr<IWebBrowserPriv2Common, NULL> browser_priv2;
+ base::win::ScopedComPtr<IWebBrowserPriv2Common, NULL> browser_priv2;
for (int i = 0; i < arraysize(interface_ids) && browser_priv2 == NULL;
++i) {
hr = web_browser2.QueryInterface(*interface_ids[i],
@@ -888,7 +887,7 @@ HRESULT NavigateBrowserToMoniker(IUnknown* browser, IMoniker* moniker,
DCHECK(browser_priv2);
if (browser_priv2) {
- ScopedComPtr<IUri> uri_obj;
+ base::win::ScopedComPtr<IUri> uri_obj;
uri_container->GetIUri(uri_obj.Receive());
DCHECK(uri_obj);
@@ -913,7 +912,7 @@ HRESULT NavigateBrowserToMoniker(IUnknown* browser, IMoniker* moniker,
LPOLESTR url = NULL;
if (SUCCEEDED(hr = moniker->GetDisplayName(bind_ctx, NULL, &url))) {
DVLOG(1) << __FUNCTION__ << " " << url;
- ScopedComPtr<IWebBrowserPriv> browser_priv;
+ base::win::ScopedComPtr<IWebBrowserPriv> browser_priv;
if (SUCCEEDED(hr = browser_priv.QueryFrom(web_browser2))) {
GURL target_url(url);
// On IE6 if the original URL has a fragment then the navigation
@@ -1021,14 +1020,14 @@ bool IsSubFrameRequest(IUnknown* service_provider) {
// We need to be able to get at an IWebBrowser2 if we are to decide whether
// this request originates from a non-top-level frame.
- ScopedComPtr<IWebBrowser2> web_browser;
+ base::win::ScopedComPtr<IWebBrowser2> web_browser;
HRESULT hr = DoQueryService(IID_ITargetFrame2, service_provider,
web_browser.Receive());
bool is_sub_frame_request = false;
if (web_browser) {
// Now check to see if we are in a sub-frame.
- ScopedComPtr<IHTMLWindow2> current_frame, parent_frame;
+ base::win::ScopedComPtr<IHTMLWindow2> current_frame, parent_frame;
hr = DoQueryService(IID_IHTMLWindow2, service_provider,
current_frame.Receive());
if (current_frame) {
@@ -1181,7 +1180,7 @@ std::string GetHttpHeadersFromBinding(IBinding* binding) {
return std::string();
}
- ScopedComPtr<IWinInetHttpInfo> info;
+ base::win::ScopedComPtr<IWinInetHttpInfo> info;
if (FAILED(info.QueryFrom(binding))) {
DLOG(WARNING) << "Failed to QI for IWinInetHttpInfo";
return std::string();
@@ -1199,7 +1198,7 @@ int GetHttpResponseStatusFromBinding(IBinding* binding) {
int http_status = 0;
- ScopedComPtr<IWinInetHttpInfo> info;
+ base::win::ScopedComPtr<IWinInetHttpInfo> info;
if (SUCCEEDED(info.QueryFrom(binding))) {
char status[10] = {0};
DWORD buf_size = sizeof(status);
@@ -1632,13 +1631,13 @@ bool IsChromeFrameDocument(IWebBrowser2* web_browser) {
if (!web_browser)
return false;
- ScopedComPtr<IDispatch> doc;
+ base::win::ScopedComPtr<IDispatch> doc;
web_browser->get_Document(doc.Receive());
if (doc) {
// Detect if CF is rendering based on whether the document is a
// ChromeActiveDocument. Detecting based on hwnd is problematic as
// the CF Active Document window may not have been created yet.
- ScopedComPtr<IChromeFrame> chrome_frame;
+ base::win::ScopedComPtr<IChromeFrame> chrome_frame;
chrome_frame.QueryFrom(doc);
return chrome_frame.get() != NULL;
}
diff --git a/content/common/gpu/media/mft_angle_video_device.h b/content/common/gpu/media/mft_angle_video_device.h
index 8abe461..17a48ca 100644
--- a/content/common/gpu/media/mft_angle_video_device.h
+++ b/content/common/gpu/media/mft_angle_video_device.h
@@ -5,7 +5,7 @@
#ifndef CONTENT_GPU_MEDIA_MFT_ANGLE_VIDEO_DEVICE_H_
#define CONTENT_GPU_MEDIA_MFT_ANGLE_VIDEO_DEVICE_H_
-#include "base/scoped_comptr_win.h"
+#include "base/win/scoped_comptr.h"
#include "content/common/gpu/media/gpu_video_device.h"
struct IDirect3DDevice9;
@@ -36,7 +36,7 @@ class MftAngleVideoDevice : public GpuVideoDevice {
scoped_refptr<media::VideoFrame> frame);
private:
- ScopedComPtr<IDirect3DDevice9, &IID_IDirect3DDevice9> device_;
+ base::win::ScopedComPtr<IDirect3DDevice9, &IID_IDirect3DDevice9> device_;
};
#endif // CONTENT_GPU_MEDIA_MFT_ANGLE_VIDEO_DEVICE_H_
diff --git a/media/tools/mfdecoder/main.cc b/media/tools/mfdecoder/main.cc
index fc576f4..4d35f9d 100644
--- a/media/tools/mfdecoder/main.cc
+++ b/media/tools/mfdecoder/main.cc
@@ -20,8 +20,8 @@
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "base/message_loop.h"
-#include "base/scoped_comptr_win.h"
#include "base/time.h"
+#include "base/win/scoped_comptr.h"
#include "media/base/yuv_convert.h"
#include "media/tools/mfdecoder/mfdecoder.h"
#include "ui/gfx/gdi_util.h"
@@ -166,7 +166,7 @@ static bool PaintMediaBufferOntoWindow(HWND video_window,
static bool PaintD3D9BufferOntoWindow(IDirect3DDevice9* device,
IMFMediaBuffer* video_buffer) {
CHECK(device != NULL);
- ScopedComPtr<IDirect3DSurface9> surface;
+ base::win::ScopedComPtr<IDirect3DSurface9> surface;
HRESULT hr = MFGetService(video_buffer, MR_BUFFER_SERVICE,
IID_PPV_ARGS(surface.Receive()));
if (FAILED(hr)) {
@@ -181,7 +181,7 @@ static bool PaintD3D9BufferOntoWindow(IDirect3DDevice9* device,
LOG(ERROR) << "Device->Clear() failed";
return false;
}
- ScopedComPtr<IDirect3DSurface9> backbuffer;
+ base::win::ScopedComPtr<IDirect3DSurface9> backbuffer;
hr = device->GetBackBuffer(0, 0, D3DBACKBUFFER_TYPE_MONO,
backbuffer.Receive());
if (FAILED(hr)) {
@@ -229,7 +229,7 @@ static bool DrawVideoSample(HWND video_window, media::MFDecoder* decoder,
<< "stream has been reached";
return false;
}
- ScopedComPtr<IMFSample> video_sample;
+ base::win::ScopedComPtr<IMFSample> video_sample;
base::Time decode_time_start(base::Time::Now());
video_sample.Attach(decoder->ReadVideoSample());
if (video_sample.get() == NULL) {
@@ -250,7 +250,7 @@ static bool DrawVideoSample(HWND video_window, media::MFDecoder* decoder,
// For H.264 videos, the number of buffers in the sample is 1.
CHECK_EQ(buffer_count, 1u) << "buffer_count should be equal "
<< "to 1 for H.264 format";
- ScopedComPtr<IMFMediaBuffer> video_buffer;
+ base::win::ScopedComPtr<IMFMediaBuffer> video_buffer;
hr = video_sample->GetBufferByIndex(0, video_buffer.Receive());
if (FAILED(hr)) {
LOG(ERROR) << "Failed to get buffer from sample";
@@ -308,8 +308,8 @@ static IDirect3DDeviceManager9* CreateD3DDevManager(HWND video_window,
CHECK(device != NULL);
int ret = -1;
- ScopedComPtr<IDirect3DDeviceManager9> dev_manager;
- ScopedComPtr<IDirect3D9> d3d;
+ base::win::ScopedComPtr<IDirect3DDeviceManager9> dev_manager;
+ base::win::ScopedComPtr<IDirect3D9> d3d;
d3d.Attach(Direct3DCreate9(D3D_SDK_VERSION));
if (d3d == NULL) {
LOG(ERROR) << "Failed to create D3D9";
@@ -330,7 +330,7 @@ static IDirect3DDeviceManager9* CreateD3DDevManager(HWND video_window,
present_params.FullScreen_RefreshRateInHz = 0;
present_params.PresentationInterval = 0;
- ScopedComPtr<IDirect3DDevice9> temp_device;
+ base::win::ScopedComPtr<IDirect3DDevice9> temp_device;
// D3DCREATE_HARDWARE_VERTEXPROCESSING specifies hardware vertex processing.
HRESULT hr = d3d->CreateDevice(D3DADAPTER_DEFAULT,
@@ -481,8 +481,8 @@ int main(int argc, char** argv) {
LOG(ERROR) << "Failed to create decoder";
return -1;
}
- ScopedComPtr<IDirect3DDeviceManager9> dev_manager;
- ScopedComPtr<IDirect3DDevice9> device;
+ base::win::ScopedComPtr<IDirect3DDeviceManager9> dev_manager;
+ base::win::ScopedComPtr<IDirect3DDevice9> device;
if (decoder->use_dxva2()) {
dev_manager.Attach(CreateD3DDevManager(video_window, device.Receive()));
if (dev_manager.get() == NULL || device.get() == NULL) {
diff --git a/media/tools/mfdecoder/mfdecoder.cc b/media/tools/mfdecoder/mfdecoder.cc
index a2b3ba97..cef40d42 100644
--- a/media/tools/mfdecoder/mfdecoder.cc
+++ b/media/tools/mfdecoder/mfdecoder.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -16,7 +16,7 @@
#include <windows.h>
#include "base/logging.h"
-#include "base/scoped_comptr_win.h"
+#include "base/win/scoped_comptr.h"
#include "media/tools/mfdecoder/mfdecoder.h"
#pragma comment(lib, "shlwapi.lib")
@@ -89,7 +89,7 @@ bool MFDecoder::Init(const wchar_t* source_url,
IMFSample* MFDecoder::ReadVideoSample() {
CHECK(reader_ != NULL);
CHECK_GE(video_stream_index_, 0);
- ScopedComPtr<IMFSample> video_sample;
+ base::win::ScopedComPtr<IMFSample> video_sample;
DWORD actual_stream_index;
DWORD output_flags;
@@ -153,7 +153,7 @@ bool MFDecoder::InitLibraries() {
bool MFDecoder::InitSourceReader(const wchar_t* source_url,
IDirect3DDeviceManager9* dev_manager) {
CHECK(source_url != NULL);
- ScopedComPtr<IMFAttributes> reader_attributes;
+ base::win::ScopedComPtr<IMFAttributes> reader_attributes;
if (use_dxva2_) {
reader_attributes.Attach(GetDXVA2AttributesForSourceReader(dev_manager));
if (reader_attributes == NULL) {
@@ -176,7 +176,7 @@ IMFAttributes* MFDecoder::GetDXVA2AttributesForSourceReader(
if (!use_dxva2_)
return NULL;
CHECK(dev_manager != NULL);
- ScopedComPtr<IMFAttributes> attributes;
+ base::win::ScopedComPtr<IMFAttributes> attributes;
// Create an attribute store with an initial size of 2.
HRESULT hr = MFCreateAttributes(attributes.Receive(), 2);
@@ -201,7 +201,7 @@ bool MFDecoder::SelectVideoStreamOnly() {
CHECK(reader_ != NULL);
HRESULT hr;
for (DWORD stream_index = 0; ; stream_index++) {
- ScopedComPtr<IMFMediaType> media_type;
+ base::win::ScopedComPtr<IMFMediaType> media_type;
hr = reader_->GetCurrentMediaType(stream_index, media_type.Receive());
if (SUCCEEDED(hr)) {
GUID major_type;
@@ -241,7 +241,7 @@ bool MFDecoder::SelectVideoStreamOnly() {
bool MFDecoder::InitVideoInfo(IDirect3DDeviceManager9* dev_manager) {
CHECK(reader_ != NULL);
CHECK_GE(video_stream_index_, 0);
- ScopedComPtr<IMFMediaType> video_type;
+ base::win::ScopedComPtr<IMFMediaType> video_type;
HRESULT hr = reader_->GetCurrentMediaType(video_stream_index_,
video_type.Receive());
if (FAILED(hr)) {
@@ -267,7 +267,7 @@ bool MFDecoder::InitVideoInfo(IDirect3DDeviceManager9* dev_manager) {
// Try to change to YV12 output format.
const GUID kOutputVideoSubtype = MFVideoFormat_YV12;
- ScopedComPtr<IMFMediaType> output_video_format;
+ base::win::ScopedComPtr<IMFMediaType> output_video_format;
hr = MFCreateMediaType(output_video_format.Receive());
if (FAILED(hr)) {
LOG(ERROR) << "Failed to create a IMFMediaType object for video output";
@@ -301,7 +301,7 @@ bool MFDecoder::InitVideoInfo(IDirect3DDeviceManager9* dev_manager) {
// Send a message to the decoder to tell it to use DXVA2.
if (use_dxva2_) {
// Call GetServiceForStream to get the interface to the video decoder.
- ScopedComPtr<IMFTransform> video_decoder;
+ base::win::ScopedComPtr<IMFTransform> video_decoder;
hr = reader_->GetServiceForStream(video_stream_index_, GUID_NULL,
IID_PPV_ARGS(video_decoder.Receive()));
if (FAILED(hr)) {
diff --git a/media/video/mft_h264_decode_engine.cc b/media/video/mft_h264_decode_engine.cc
index 4acfc7f..e1eb60a 100644
--- a/media/video/mft_h264_decode_engine.cc
+++ b/media/video/mft_h264_decode_engine.cc
@@ -31,7 +31,7 @@ namespace media {
// Creates an empty Media Foundation sample with no buffers.
static IMFSample* CreateEmptySample() {
HRESULT hr;
- ScopedComPtr<IMFSample> sample;
+ base::win::ScopedComPtr<IMFSample> sample;
hr = MFCreateSample(sample.Receive());
if (FAILED(hr)) {
LOG(ERROR) << "Unable to create an empty sample";
@@ -45,11 +45,11 @@ static IMFSample* CreateEmptySample() {
// If |align| is 0, then no alignment is specified.
static IMFSample* CreateEmptySampleWithBuffer(int buffer_length, int align) {
CHECK_GT(buffer_length, 0);
- ScopedComPtr<IMFSample> sample;
+ base::win::ScopedComPtr<IMFSample> sample;
sample.Attach(CreateEmptySample());
if (!sample.get())
return NULL;
- ScopedComPtr<IMFMediaBuffer> buffer;
+ base::win::ScopedComPtr<IMFMediaBuffer> buffer;
HRESULT hr;
if (align == 0) {
// Note that MFCreateMemoryBuffer is same as MFCreateAlignedMemoryBuffer
@@ -84,7 +84,7 @@ static IMFSample* CreateInputSample(const uint8* stream, int size,
int min_size, int alignment) {
CHECK(stream);
CHECK_GT(size, 0);
- ScopedComPtr<IMFSample> sample;
+ base::win::ScopedComPtr<IMFSample> sample;
sample.Attach(CreateEmptySampleWithBuffer(std::max(min_size, size),
alignment));
if (!sample.get()) {
@@ -106,7 +106,7 @@ static IMFSample* CreateInputSample(const uint8* stream, int size,
return NULL;
}
}
- ScopedComPtr<IMFMediaBuffer> buffer;
+ base::win::ScopedComPtr<IMFMediaBuffer> buffer;
hr = sample->GetBufferByIndex(0, buffer.Receive());
if (FAILED(hr)) {
LOG(ERROR) << "Failed to get buffer in sample";
@@ -250,7 +250,7 @@ void MftH264DecodeEngine::ConsumeVideoSample(scoped_refptr<Buffer> buffer) {
if (state_ == kUninitialized) {
LOG(ERROR) << "ConsumeVideoSample: invalid state";
}
- ScopedComPtr<IMFSample> sample;
+ base::win::ScopedComPtr<IMFSample> sample;
PipelineStatistics statistics;
if (!buffer->IsEndOfStream()) {
sample.Attach(
@@ -326,7 +326,7 @@ void MftH264DecodeEngine::ShutdownComLibraries() {
bool MftH264DecodeEngine::EnableDxva() {
IDirect3DDevice9* device = static_cast<IDirect3DDevice9*>(
context_->GetDevice());
- ScopedComPtr<IDirect3DDeviceManager9> device_manager;
+ base::win::ScopedComPtr<IDirect3DDeviceManager9> device_manager;
UINT dev_manager_reset_token = 0;
HRESULT hr = DXVA2CreateDirect3DDeviceManager9(&dev_manager_reset_token,
device_manager.Receive());
@@ -400,7 +400,7 @@ void MftH264DecodeEngine::OnAllocFramesDone() {
}
bool MftH264DecodeEngine::CheckDecodeEngineDxvaSupport() {
- ScopedComPtr<IMFAttributes> attributes;
+ base::win::ScopedComPtr<IMFAttributes> attributes;
HRESULT hr = decode_engine_->GetAttributes(attributes.Receive());
if (FAILED(hr)) {
LOG(ERROR) << "Unlock: Failed to get attributes, hr = "
@@ -427,7 +427,7 @@ bool MftH264DecodeEngine::SetDecodeEngineMediaTypes() {
}
bool MftH264DecodeEngine::SetDecodeEngineInputMediaType() {
- ScopedComPtr<IMFMediaType> media_type;
+ base::win::ScopedComPtr<IMFMediaType> media_type;
HRESULT hr = MFCreateMediaType(media_type.Receive());
if (FAILED(hr)) {
LOG(ERROR) << "Failed to create empty media type object";
@@ -541,7 +541,7 @@ bool MftH264DecodeEngine::DoDecode(const PipelineStatistics& statistics) {
return false;
}
scoped_refptr<VideoFrame> frame;
- ScopedComPtr<IMFSample> output_sample;
+ base::win::ScopedComPtr<IMFSample> output_sample;
if (!use_dxva_) {
output_sample.Attach(
CreateEmptySampleWithBuffer(output_stream_info_.cbSize,
@@ -633,14 +633,14 @@ bool MftH264DecodeEngine::DoDecode(const PipelineStatistics& statistics) {
return true;
}
- ScopedComPtr<IMFMediaBuffer> output_buffer;
+ base::win::ScopedComPtr<IMFMediaBuffer> output_buffer;
hr = output_sample->GetBufferByIndex(0, output_buffer.Receive());
if (FAILED(hr)) {
LOG(ERROR) << "Failed to get buffer from sample";
return true;
}
if (use_dxva_) {
- ScopedComPtr<IDirect3DSurface9, &IID_IDirect3DSurface9> surface;
+ base::win::ScopedComPtr<IDirect3DSurface9, &IID_IDirect3DSurface9> surface;
hr = MFGetService(output_buffer, MR_BUFFER_SERVICE,
IID_PPV_ARGS(surface.Receive()));
if (FAILED(hr)) {
@@ -684,7 +684,7 @@ bool MftH264DecodeEngine::DoDecode(const PipelineStatistics& statistics) {
}
void MftH264DecodeEngine::OnUploadVideoFrameDone(
- ScopedComPtr<IDirect3DSurface9, &IID_IDirect3DSurface9> surface,
+ base::win::ScopedComPtr<IDirect3DSurface9, &IID_IDirect3DSurface9> surface,
scoped_refptr<VideoFrame> frame,
PipelineStatistics statistics) {
// After this method is exited the reference to surface is released.
diff --git a/media/video/mft_h264_decode_engine.h b/media/video/mft_h264_decode_engine.h
index 9ce7935..9a2ca5d 100644
--- a/media/video/mft_h264_decode_engine.h
+++ b/media/video/mft_h264_decode_engine.h
@@ -17,7 +17,7 @@
#include <vector>
#include "base/gtest_prod_util.h"
-#include "base/scoped_comptr_win.h"
+#include "base/win/scoped_comptr.h"
#include "media/video/video_decode_engine.h"
struct IDirect3DSurface9;
@@ -77,11 +77,12 @@ class MftH264DecodeEngine : public media::VideoDecodeEngine {
bool DoDecode(const PipelineStatistics& statistics);
void OnAllocFramesDone();
void OnUploadVideoFrameDone(
- ScopedComPtr<IDirect3DSurface9, &IID_IDirect3DSurface9> surface,
+ base::win::ScopedComPtr<IDirect3DSurface9,
+ &IID_IDirect3DSurface9> surface,
scoped_refptr<media::VideoFrame> frame, PipelineStatistics statistics);
bool use_dxva_;
- ScopedComPtr<IMFTransform> decode_engine_;
+ base::win::ScopedComPtr<IMFTransform> decode_engine_;
MFT_INPUT_STREAM_INFO input_stream_info_;
MFT_OUTPUT_STREAM_INFO output_stream_info_;
diff --git a/net/http/url_security_manager_win.cc b/net/http/url_security_manager_win.cc
index 1770a19..858cc50 100644
--- a/net/http/url_security_manager_win.cc
+++ b/net/http/url_security_manager_win.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -7,9 +7,9 @@
#include <urlmon.h>
#pragma comment(lib, "urlmon.lib")
-#include "base/scoped_comptr_win.h"
#include "base/string_util.h"
#include "base/utf_string_conversions.h"
+#include "base/win/scoped_comptr.h"
#include "googleurl/src/gurl.h"
#include "net/http/http_auth_filter.h"
@@ -37,7 +37,7 @@ class URLSecurityManagerWin : public URLSecurityManager {
private:
bool EnsureSystemSecurityManager();
- ScopedComPtr<IInternetSecurityManager> security_manager_;
+ base::win::ScopedComPtr<IInternetSecurityManager> security_manager_;
scoped_ptr<const HttpAuthFilter> whitelist_delegate_;
DISALLOW_COPY_AND_ASSIGN(URLSecurityManagerWin);
diff --git a/printing/backend/print_backend_win.cc b/printing/backend/print_backend_win.cc
index 4a82207..480f4b8 100644
--- a/printing/backend/print_backend_win.cc
+++ b/printing/backend/print_backend_win.cc
@@ -16,9 +16,6 @@
#include "printing/backend/print_backend_consts.h"
#include "printing/backend/win_helper.h"
-using base::win::ScopedBstr;
-using base::win::ScopedComPtr;
-
namespace {
HRESULT StreamOnHGlobalToString(IStream* stream, std::string* out) {
@@ -111,12 +108,12 @@ bool PrintBackendWin::GetPrinterCapsAndDefaults(
HRESULT hr = XPSModule::OpenProvider(printer_name_wide, 1, &provider);
DCHECK(SUCCEEDED(hr));
if (provider) {
- ScopedComPtr<IStream> print_capabilities_stream;
+ base::win::ScopedComPtr<IStream> print_capabilities_stream;
hr = CreateStreamOnHGlobal(NULL, TRUE,
print_capabilities_stream.Receive());
DCHECK(SUCCEEDED(hr));
if (print_capabilities_stream) {
- ScopedBstr error;
+ base::win::ScopedBstr error;
hr = XPSModule::GetPrintCapabilities(provider,
NULL,
print_capabilities_stream,
@@ -146,7 +143,7 @@ bool PrintBackendWin::GetPrinterCapsAndDefaults(
DocumentProperties(
NULL, printer_handle, const_cast<LPTSTR>(printer_name_wide.c_str()),
devmode_out, NULL, DM_OUT_BUFFER);
- ScopedComPtr<IStream> printer_defaults_stream;
+ base::win::ScopedComPtr<IStream> printer_defaults_stream;
hr = CreateStreamOnHGlobal(NULL, TRUE,
printer_defaults_stream.Receive());
DCHECK(SUCCEEDED(hr));
diff --git a/ui/base/dragdrop/os_exchange_data_provider_win.h b/ui/base/dragdrop/os_exchange_data_provider_win.h
index d321161..e1cf869 100644
--- a/ui/base/dragdrop/os_exchange_data_provider_win.h
+++ b/ui/base/dragdrop/os_exchange_data_provider_win.h
@@ -10,7 +10,7 @@
#include <shlobj.h>
#include <string>
-#include "base/scoped_comptr_win.h"
+#include "base/win/scoped_comptr.h"
#include "ui/base/dragdrop/os_exchange_data.h"
namespace ui {
@@ -112,7 +112,7 @@ class DataObjectImpl : public DownloadFileObserver,
typedef std::vector<StoredDataInfo*> StoredData;
StoredData contents_;
- ScopedComPtr<IDataObject> source_object_;
+ base::win::ScopedComPtr<IDataObject> source_object_;
bool is_aborting_;
bool in_async_mode_;
@@ -170,7 +170,7 @@ class OSExchangeDataProviderWin : public OSExchangeData::Provider {
private:
scoped_refptr<DataObjectImpl> data_;
- ScopedComPtr<IDataObject> source_object_;
+ base::win::ScopedComPtr<IDataObject> source_object_;
DISALLOW_COPY_AND_ASSIGN(OSExchangeDataProviderWin);
};
diff --git a/ui/base/dragdrop/os_exchange_data_win_unittest.cc b/ui/base/dragdrop/os_exchange_data_win_unittest.cc
index def16a7..dac0e06 100644
--- a/ui/base/dragdrop/os_exchange_data_win_unittest.cc
+++ b/ui/base/dragdrop/os_exchange_data_win_unittest.cc
@@ -50,7 +50,7 @@ TEST(OSExchangeDataTest, StringDataAccessViaCOM) {
OSExchangeData data;
std::wstring input = L"O hai googlz.";
data.SetString(input);
- ScopedComPtr<IDataObject> com_data(
+ base::win::ScopedComPtr<IDataObject> com_data(
OSExchangeDataProviderWin::GetIDataObject(data));
FORMATETC format_etc =
@@ -70,7 +70,7 @@ TEST(OSExchangeDataTest, StringDataWritingViaCOM) {
OSExchangeData data;
std::wstring input = L"http://www.google.com/";
- ScopedComPtr<IDataObject> com_data(
+ base::win::ScopedComPtr<IDataObject> com_data(
OSExchangeDataProviderWin::GetIDataObject(data));
// Store data in the object using the COM SetData API.
@@ -104,7 +104,7 @@ TEST(OSExchangeDataTest, URLDataAccessViaCOM) {
OSExchangeData data;
GURL url("http://www.google.com/");
data.SetURL(url, L"");
- ScopedComPtr<IDataObject> com_data(
+ base::win::ScopedComPtr<IDataObject> com_data(
OSExchangeDataProviderWin::GetIDataObject(data));
CLIPFORMAT cfstr_ineturl = RegisterClipboardFormat(CFSTR_INETURL);
@@ -128,7 +128,7 @@ TEST(OSExchangeDataTest, MultipleFormatsViaCOM) {
data.SetURL(url, L"Google");
data.SetString(text);
- ScopedComPtr<IDataObject> com_data(
+ base::win::ScopedComPtr<IDataObject> com_data(
OSExchangeDataProviderWin::GetIDataObject(data));
CLIPFORMAT cfstr_ineturl = RegisterClipboardFormat(CFSTR_INETURL);
@@ -164,9 +164,9 @@ TEST(OSExchangeDataTest, EnumerationViaCOM) {
RegisterClipboardFormat(CFSTR_FILEDESCRIPTOR);
CLIPFORMAT text_x_moz_url = RegisterClipboardFormat(L"text/x-moz-url");
- ScopedComPtr<IDataObject> com_data(
+ base::win::ScopedComPtr<IDataObject> com_data(
OSExchangeDataProviderWin::GetIDataObject(data));
- ScopedComPtr<IEnumFORMATETC> enumerator;
+ base::win::ScopedComPtr<IEnumFORMATETC> enumerator;
EXPECT_EQ(S_OK, com_data.get()->EnumFormatEtc(DATADIR_GET,
enumerator.Receive()));
@@ -220,7 +220,7 @@ TEST(OSExchangeDataTest, EnumerationViaCOM) {
{
EXPECT_EQ(S_OK, enumerator->Reset());
EXPECT_EQ(S_OK, enumerator->Skip(1));
- ScopedComPtr<IEnumFORMATETC> cloned_enumerator;
+ base::win::ScopedComPtr<IEnumFORMATETC> cloned_enumerator;
EXPECT_EQ(S_OK, enumerator.get()->Clone(cloned_enumerator.Receive()));
EXPECT_EQ(S_OK, enumerator.get()->Reset());
@@ -267,7 +267,7 @@ TEST(OSExchangeDataTest, TestURLExchangeFormats) {
EXPECT_EQ(url_spec, WideToUTF8(output_string));
// File contents access via COM
- ScopedComPtr<IDataObject> com_data(
+ base::win::ScopedComPtr<IDataObject> com_data(
OSExchangeDataProviderWin::GetIDataObject(data));
{
CLIPFORMAT cfstr_file_contents =
diff --git a/ui/gfx/canvas_direct2d.cc b/ui/gfx/canvas_direct2d.cc
index 6c4d3bb..e58f94c 100644
--- a/ui/gfx/canvas_direct2d.cc
+++ b/ui/gfx/canvas_direct2d.cc
@@ -63,7 +63,7 @@ ID2D1Brush* CreateD2D1BrushFromSkBitmap(ID2D1RenderTarget* render_target,
const SkBitmap& bitmap,
D2D1_EXTEND_MODE extend_mode_x,
D2D1_EXTEND_MODE extend_mode_y) {
- ScopedComPtr<ID2D1Bitmap> d2d1_bitmap(
+ base::win::ScopedComPtr<ID2D1Bitmap> d2d1_bitmap(
CreateD2D1BitmapFromSkBitmap(render_target, bitmap));
ID2D1BitmapBrush* brush = NULL;
@@ -85,7 +85,7 @@ class Direct2DBrush : public gfx::Brush {
ID2D1Brush* brush() const { return brush_.get(); }
private:
- ScopedComPtr<ID2D1Brush> brush_;
+ base::win::ScopedComPtr<ID2D1Brush> brush_;
DISALLOW_COPY_AND_ASSIGN(Direct2DBrush);
};
@@ -204,7 +204,7 @@ void CanvasDirect2D::ScaleInt(int x, int y) {
void CanvasDirect2D::FillRectInt(const SkColor& color,
int x, int y, int w, int h) {
- ScopedComPtr<ID2D1SolidColorBrush> solid_brush;
+ base::win::ScopedComPtr<ID2D1SolidColorBrush> solid_brush;
rt_->CreateSolidColorBrush(SkColorToColorF(color), solid_brush.Receive());
rt_->FillRectangle(RectToRectF(x, y, w, h), solid_brush);
}
@@ -223,7 +223,7 @@ void CanvasDirect2D::FillRectInt(const gfx::Brush* brush,
void CanvasDirect2D::DrawRectInt(const SkColor& color,
int x, int y, int w, int h) {
- ScopedComPtr<ID2D1SolidColorBrush> solid_brush;
+ base::win::ScopedComPtr<ID2D1SolidColorBrush> solid_brush;
rt_->CreateSolidColorBrush(SkColorToColorF(color), solid_brush.Receive());
rt_->DrawRectangle(RectToRectF(x, y, w, h), solid_brush);
}
@@ -242,13 +242,13 @@ void CanvasDirect2D::DrawRectInt(int x, int y, int w, int h,
void CanvasDirect2D::DrawLineInt(const SkColor& color,
int x1, int y1,
int x2, int y2) {
- ScopedComPtr<ID2D1SolidColorBrush> solid_brush;
+ base::win::ScopedComPtr<ID2D1SolidColorBrush> solid_brush;
rt_->CreateSolidColorBrush(SkColorToColorF(color), solid_brush.Receive());
rt_->DrawLine(PointToPoint2F(x1, y1), PointToPoint2F(x2, y2), solid_brush);
}
void CanvasDirect2D::DrawBitmapInt(const SkBitmap& bitmap, int x, int y) {
- ScopedComPtr<ID2D1Bitmap> d2d1_bitmap(
+ base::win::ScopedComPtr<ID2D1Bitmap> d2d1_bitmap(
CreateD2D1BitmapFromSkBitmap(rt_, bitmap));
rt_->DrawBitmap(d2d1_bitmap,
RectToRectF(x, y, bitmap.width(), bitmap.height()),
@@ -268,7 +268,7 @@ void CanvasDirect2D::DrawBitmapInt(const SkBitmap& bitmap,
int dest_x, int dest_y,
int dest_w, int dest_h,
bool filter) {
- ScopedComPtr<ID2D1Bitmap> d2d1_bitmap(
+ base::win::ScopedComPtr<ID2D1Bitmap> d2d1_bitmap(
CreateD2D1BitmapFromSkBitmap(rt_, bitmap));
rt_->DrawBitmap(d2d1_bitmap,
RectToRectF(dest_x, dest_y, dest_w, dest_h),
@@ -314,7 +314,7 @@ void CanvasDirect2D::DrawFocusRect(int x, int y, int width, int height) {
void CanvasDirect2D::TileImageInt(const SkBitmap& bitmap,
int x, int y, int w, int h) {
- ScopedComPtr<ID2D1Brush> brush(
+ base::win::ScopedComPtr<ID2D1Brush> brush(
CreateD2D1BrushFromSkBitmap(rt_, bitmap, D2D1_EXTEND_MODE_WRAP,
D2D1_EXTEND_MODE_WRAP));
rt_->FillRectangle(RectToRectF(x, y, w, h), brush);
diff --git a/ui/gfx/canvas_direct2d.h b/ui/gfx/canvas_direct2d.h
index 88ab8bf..83a439c 100644
--- a/ui/gfx/canvas_direct2d.h
+++ b/ui/gfx/canvas_direct2d.h
@@ -10,7 +10,7 @@
#include <stack>
-#include "base/scoped_comptr_win.h"
+#include "base/win/scoped_comptr.h"
#include "ui/gfx/canvas.h"
namespace gfx {
@@ -86,8 +86,8 @@ class CanvasDirect2D : public Canvas {
void SaveInternal(ID2D1Layer* layer);
ID2D1RenderTarget* rt_;
- ScopedComPtr<ID2D1GdiInteropRenderTarget> interop_rt_;
- ScopedComPtr<ID2D1DrawingStateBlock> drawing_state_block_;
+ base::win::ScopedComPtr<ID2D1GdiInteropRenderTarget> interop_rt_;
+ base::win::ScopedComPtr<ID2D1DrawingStateBlock> drawing_state_block_;
static ID2D1Factory* d2d1_factory_;
// Every time Save* is called, a RenderState object is pushed onto the
diff --git a/ui/gfx/canvas_direct2d_unittest.cc b/ui/gfx/canvas_direct2d_unittest.cc
index a678252..740f766 100644
--- a/ui/gfx/canvas_direct2d_unittest.cc
+++ b/ui/gfx/canvas_direct2d_unittest.cc
@@ -99,7 +99,7 @@ class TestWindow {
HWND hwnd_;
- ScopedComPtr<ID2D1RenderTarget> rt_;
+ base::win::ScopedComPtr<ID2D1RenderTarget> rt_;
DISALLOW_COPY_AND_ASSIGN(TestWindow);
};