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 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
280 return hr; | 280 return hr; |
281 | 281 |
282 // The above call to ::AccessibleObjectFromWindow fails for unknown | 282 // The above call to ::AccessibleObjectFromWindow fails for unknown |
283 // reasons every once in a while on the bots. Work around it by grabbing | 283 // reasons every once in a while on the bots. Work around it by grabbing |
284 // the object directly from the BrowserAccessibilityManager. | 284 // the object directly from the BrowserAccessibilityManager. |
285 HWND accessibility_hwnd = | 285 HWND accessibility_hwnd = |
286 manager_->delegate()->AccessibilityGetAcceleratedWidget(); | 286 manager_->delegate()->AccessibilityGetAcceleratedWidget(); |
287 if (accessibility_hwnd != hwnd) | 287 if (accessibility_hwnd != hwnd) |
288 return E_FAIL; | 288 return E_FAIL; |
289 | 289 |
290 IAccessible* obj = manager_->GetRoot()->ToBrowserAccessibilityWin(); | 290 IAccessible* obj = ToBrowserAccessibilityWin(manager_->GetRoot()); |
291 obj->AddRef(); | 291 obj->AddRef(); |
292 *ppv_object = obj; | 292 *ppv_object = obj; |
293 return S_OK; | 293 return S_OK; |
294 } | 294 } |
295 | 295 |
296 } // namespace content | 296 } // namespace content |
OLD | NEW |