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

Side by Side Diff: chrome/browser/ui/views/accessibility/navigation_accessibility_uitest_win.cc

Issue 985853005: base: Remove operator& from ScopedVariant and ScopedPropVariant. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scoped-operator: prop-ptr Created 5 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <oleacc.h> 5 #include <oleacc.h>
6 6
7 #include "base/strings/string_util.h" 7 #include "base/strings/string_util.h"
8 #include "base/win/scoped_bstr.h" 8 #include "base/win/scoped_bstr.h"
9 #include "base/win/scoped_com_initializer.h" 9 #include "base/win/scoped_com_initializer.h"
10 #include "base/win/scoped_comptr.h" 10 #include "base/win/scoped_comptr.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 *out_hwnd = event_info.hwnd; 117 *out_hwnd = event_info.hwnd;
118 118
119 base::win::ScopedComPtr<IAccessible> acc_obj; 119 base::win::ScopedComPtr<IAccessible> acc_obj;
120 base::win::ScopedVariant child_variant; 120 base::win::ScopedVariant child_variant;
121 CHECK(S_OK == AccessibleObjectFromEvent( 121 CHECK(S_OK == AccessibleObjectFromEvent(
122 event_info.hwnd, event_info.obj_id, event_info.child_id, 122 event_info.hwnd, event_info.obj_id, event_info.child_id,
123 acc_obj.Receive(), child_variant.Receive())); 123 acc_obj.Receive(), child_variant.Receive()));
124 124
125 base::win::ScopedVariant role_variant; 125 base::win::ScopedVariant role_variant;
126 if (S_OK == acc_obj->get_accRole(child_variant, role_variant.Receive())) 126 if (S_OK == acc_obj->get_accRole(child_variant, role_variant.Receive()))
127 *out_role = V_I4(&role_variant); 127 *out_role = V_I4(role_variant.ptr());
128 else 128 else
129 *out_role = 0; 129 *out_role = 0;
130 130
131 base::win::ScopedVariant state_variant; 131 base::win::ScopedVariant state_variant;
132 if (S_OK == acc_obj->get_accState(child_variant, state_variant.Receive())) 132 if (S_OK == acc_obj->get_accState(child_variant, state_variant.Receive()))
133 *out_state = V_I4(&state_variant); 133 *out_state = V_I4(state_variant.ptr());
134 else 134 else
135 *out_state = 0; 135 *out_state = 0;
136 136
137 base::win::ScopedBstr name_bstr; 137 base::win::ScopedBstr name_bstr;
138 HRESULT hr = acc_obj->get_accName(child_variant, name_bstr.Receive()); 138 HRESULT hr = acc_obj->get_accName(child_variant, name_bstr.Receive());
139 if (S_OK == hr) 139 if (S_OK == hr)
140 *out_name = base::UTF16ToUTF8(base::string16(name_bstr)); 140 *out_name = base::UTF16ToUTF8(base::string16(name_bstr));
141 else 141 else
142 *out_name = ""; 142 *out_name = "";
143 } 143 }
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 // second page. 248 // second page.
249 EXPECT_NE("First Page", name); 249 EXPECT_NE("First Page", name);
250 250
251 // Finish when we get an event on the second page. 251 // Finish when we get an event on the second page.
252 if (name == "This page is in English") { 252 if (name == "This page is in English") {
253 LOG(INFO) << "Got event on second page, finishing test."; 253 LOG(INFO) << "Got event on second page, finishing test.";
254 break; 254 break;
255 } 255 }
256 } 256 }
257 } 257 }
OLDNEW
« no previous file with comments | « chrome/browser/importer/ie_importer_browsertest_win.cc ('k') | chrome/installer/util/advanced_firewall_manager_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698