| 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 "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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |