OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "content/browser/accessibility/accessibility_event_recorder.h" | 5 #include "content/browser/accessibility/accessibility_event_recorder.h" |
6 | 6 |
7 #include <oleacc.h> | 7 #include <oleacc.h> |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 HRESULT hr = AccessibleObjectFromWindow( | 169 HRESULT hr = AccessibleObjectFromWindow( |
170 hwnd, | 170 hwnd, |
171 obj_id, | 171 obj_id, |
172 IID_IAccessible, | 172 IID_IAccessible, |
173 reinterpret_cast<void**>(browser_accessible.Receive())); | 173 reinterpret_cast<void**>(browser_accessible.Receive())); |
174 if (!SUCCEEDED(hr)) { | 174 if (!SUCCEEDED(hr)) { |
175 // Note: our event hook will pick up some superfluous events we | 175 // Note: our event hook will pick up some superfluous events we |
176 // don't care about, so it's safe to just ignore these failures. | 176 // don't care about, so it's safe to just ignore these failures. |
177 // Same below for other HRESULT checks. | 177 // Same below for other HRESULT checks. |
178 LOG(INFO) << "Ignoring result " << hr << " from AccessibleObjectFromWindow"; | 178 LOG(INFO) << "Ignoring result " << hr << " from AccessibleObjectFromWindow"; |
| 179 TCHAR name[MAX_PATH]; |
| 180 GetClassName(hwnd, name, _countof(name)); |
| 181 LOG(INFO) << "Hwnd " << hwnd << " class is " << name; |
179 return; | 182 return; |
180 } | 183 } |
181 | 184 |
182 base::win::ScopedVariant childid_variant(child_id); | 185 base::win::ScopedVariant childid_variant(child_id); |
183 base::win::ScopedComPtr<IDispatch> dispatch; | 186 base::win::ScopedComPtr<IDispatch> dispatch; |
184 hr = browser_accessible->get_accChild(childid_variant, dispatch.Receive()); | 187 hr = browser_accessible->get_accChild(childid_variant, dispatch.Receive()); |
185 if (!SUCCEEDED(hr) || !dispatch) { | 188 if (!SUCCEEDED(hr) || !dispatch) { |
186 LOG(INFO) << "Ignoring result " << hr << " and result " << dispatch | 189 LOG(INFO) << "Ignoring result " << hr << " and result " << dispatch |
187 << " from get_accChild"; | 190 << " from get_accChild"; |
188 return; | 191 return; |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 } | 243 } |
241 } | 244 } |
242 } | 245 } |
243 | 246 |
244 LOG(INFO) << "Got event log: " << log; | 247 LOG(INFO) << "Got event log: " << log; |
245 | 248 |
246 event_logs_.push_back(log); | 249 event_logs_.push_back(log); |
247 } | 250 } |
248 | 251 |
249 } // namespace content | 252 } // namespace content |
OLD | NEW |