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

Side by Side Diff: content/browser/accessibility/accessibility_event_recorder_win.cc

Issue 1762143002: Use unique IDs for accessibility nodes on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix null obj deref in DCHECK Created 4 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
« no previous file with comments | « no previous file | content/browser/accessibility/accessibility_tree_formatter_auralinux.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « no previous file | content/browser/accessibility/accessibility_tree_formatter_auralinux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698