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

Side by Side Diff: ui/accessibility/platform/ax_platform_node_base.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
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 "ui/accessibility/platform/ax_platform_node_base.h" 5 #include "ui/accessibility/platform/ax_platform_node_base.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "ui/accessibility/ax_node_data.h" 8 #include "ui/accessibility/ax_node_data.h"
9 #include "ui/accessibility/platform/ax_platform_node_delegate.h" 9 #include "ui/accessibility/platform/ax_platform_node_delegate.h"
10 10
(...skipping 26 matching lines...) Expand all
37 } 37 }
38 38
39 gfx::NativeViewAccessible AXPlatformNodeBase::ChildAtIndex(int index) { 39 gfx::NativeViewAccessible AXPlatformNodeBase::ChildAtIndex(int index) {
40 CHECK(delegate_); 40 CHECK(delegate_);
41 return delegate_->ChildAtIndex(index); 41 return delegate_->ChildAtIndex(index);
42 } 42 }
43 43
44 // AXPlatformNode overrides. 44 // AXPlatformNode overrides.
45 45
46 void AXPlatformNodeBase::Destroy() { 46 void AXPlatformNodeBase::Destroy() {
47 AXPlatformNode::Destroy();
47 delegate_ = nullptr; 48 delegate_ = nullptr;
48 delete this; 49 delete this;
49 } 50 }
50 51
51 gfx::NativeViewAccessible AXPlatformNodeBase::GetNativeViewAccessible() { 52 gfx::NativeViewAccessible AXPlatformNodeBase::GetNativeViewAccessible() {
52 return nullptr; 53 return nullptr;
53 } 54 }
54 55
55 AXPlatformNodeDelegate* AXPlatformNodeBase::GetDelegate() const { 56 AXPlatformNodeDelegate* AXPlatformNodeBase::GetDelegate() const {
56 return delegate_; 57 return delegate_;
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 } 189 }
189 190
190 // static 191 // static
191 AXPlatformNodeBase* AXPlatformNodeBase::FromNativeViewAccessible( 192 AXPlatformNodeBase* AXPlatformNodeBase::FromNativeViewAccessible(
192 gfx::NativeViewAccessible accessible) { 193 gfx::NativeViewAccessible accessible) {
193 return static_cast<AXPlatformNodeBase*>( 194 return static_cast<AXPlatformNodeBase*>(
194 AXPlatformNode::FromNativeViewAccessible(accessible)); 195 AXPlatformNode::FromNativeViewAccessible(accessible));
195 } 196 }
196 197
197 } // namespace ui 198 } // namespace ui
OLDNEW
« no previous file with comments | « ui/accessibility/platform/ax_platform_node.cc ('k') | ui/accessibility/platform/ax_platform_node_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698