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

Unified Diff: content/browser/accessibility/accessibility_event_recorder_win.cc

Issue 2870263002: Rename ScopedComPtr::Receive to ScopedComPtr::GetAddressOf (Closed)
Patch Set: Rebase to 2a6f440 Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/accessibility/accessibility_event_recorder_win.cc
diff --git a/content/browser/accessibility/accessibility_event_recorder_win.cc b/content/browser/accessibility/accessibility_event_recorder_win.cc
index 33ac6743d601e3f360a2975499257248edce9153..c2366712e56d7ee63407aa8fb91f22aad97999bd 100644
--- a/content/browser/accessibility/accessibility_event_recorder_win.cc
+++ b/content/browser/accessibility/accessibility_event_recorder_win.cc
@@ -39,7 +39,7 @@ std::string RoleVariantToString(const base::win::ScopedVariant& role) {
HRESULT QueryIAccessible2(IAccessible* accessible, IAccessible2** accessible2) {
base::win::ScopedComPtr<IServiceProvider> service_provider;
- HRESULT hr = accessible->QueryInterface(service_provider.Receive());
+ HRESULT hr = accessible->QueryInterface(service_provider.GetAddressOf());
return SUCCEEDED(hr) ?
service_provider->QueryService(IID_IAccessible2, accessible2) : hr;
}
@@ -47,7 +47,7 @@ HRESULT QueryIAccessible2(IAccessible* accessible, IAccessible2** accessible2) {
HRESULT QueryIAccessibleText(IAccessible* accessible,
IAccessibleText** accessible_text) {
base::win::ScopedComPtr<IServiceProvider> service_provider;
- HRESULT hr = accessible->QueryInterface(service_provider.Receive());
+ HRESULT hr = accessible->QueryInterface(service_provider.GetAddressOf());
return SUCCEEDED(hr) ?
service_provider->QueryService(IID_IAccessibleText, accessible_text) : hr;
}
@@ -165,10 +165,8 @@ void AccessibilityEventRecorderWin::OnWinEventHook(
DWORD event_time) {
base::win::ScopedComPtr<IAccessible> browser_accessible;
HRESULT hr = AccessibleObjectFromWindowWrapper(
- hwnd,
- obj_id,
- IID_IAccessible,
- reinterpret_cast<void**>(browser_accessible.Receive()));
+ hwnd, obj_id, IID_IAccessible,
+ reinterpret_cast<void**>(browser_accessible.GetAddressOf()));
if (!SUCCEEDED(hr)) {
// Note: our event hook will pick up some superfluous events we
// don't care about, so it's safe to just ignore these failures.
@@ -179,7 +177,8 @@ void AccessibilityEventRecorderWin::OnWinEventHook(
base::win::ScopedVariant childid_variant(child_id);
base::win::ScopedComPtr<IDispatch> dispatch;
- hr = browser_accessible->get_accChild(childid_variant, dispatch.Receive());
+ hr = browser_accessible->get_accChild(childid_variant,
+ dispatch.GetAddressOf());
if (!SUCCEEDED(hr) || !dispatch) {
VLOG(1) << "Ignoring result " << hr << " and result " << dispatch
<< " from get_accChild";
@@ -187,7 +186,7 @@ void AccessibilityEventRecorderWin::OnWinEventHook(
}
base::win::ScopedComPtr<IAccessible> iaccessible;
- hr = dispatch.CopyTo(iaccessible.Receive());
+ hr = dispatch.CopyTo(iaccessible.GetAddressOf());
if (!SUCCEEDED(hr)) {
VLOG(1) << "Ignoring result " << hr << " from QueryInterface";
return;
@@ -228,7 +227,7 @@ void AccessibilityEventRecorderWin::OnWinEventHook(
AccessibleStates ia2_state = 0;
base::win::ScopedComPtr<IAccessible2> iaccessible2;
- hr = QueryIAccessible2(iaccessible.Get(), iaccessible2.Receive());
+ hr = QueryIAccessible2(iaccessible.Get(), iaccessible2.GetAddressOf());
if (SUCCEEDED(hr))
iaccessible2->get_states(&ia2_state);
@@ -246,7 +245,7 @@ void AccessibilityEventRecorderWin::OnWinEventHook(
// For TEXT_REMOVED and TEXT_INSERTED events, query the text that was
// inserted or removed and include that in the log.
base::win::ScopedComPtr<IAccessibleText> accessible_text;
- hr = QueryIAccessibleText(iaccessible.Get(), accessible_text.Receive());
+ hr = QueryIAccessibleText(iaccessible.Get(), accessible_text.GetAddressOf());
if (SUCCEEDED(hr)) {
if (event == IA2_EVENT_TEXT_REMOVED) {
IA2TextSegment old_text;

Powered by Google App Engine
This is Rietveld 408576698