Index: ui/views/view.cc |
diff --git a/ui/views/view.cc b/ui/views/view.cc |
index 04c5f2fae25957c3ca3b706654e263fc8b3c6638..17bf01916eac6a4ad52ab1a8d01d49f22ed6a95b 100644 |
--- a/ui/views/view.cc |
+++ b/ui/views/view.cc |
@@ -145,8 +145,7 @@ View::View() |
previous_focusable_view_(NULL), |
focus_behavior_(FocusBehavior::NEVER), |
context_menu_controller_(NULL), |
- drag_controller_(NULL), |
- native_view_accessibility_(NULL) { |
+ drag_controller_(NULL) { |
SetTargetHandler(this); |
} |
@@ -164,11 +163,6 @@ View::~View() { |
delete child; |
} |
} |
- |
- // Release ownership of the native accessibility object, but it's |
- // reference-counted on some platforms, so it may not be deleted right away. |
- if (native_view_accessibility_) |
- native_view_accessibility_->Destroy(); |
} |
// Tree operations ------------------------------------------------------------- |
@@ -1422,10 +1416,10 @@ bool View::HandleAccessibleAction(const ui::AXActionData& action_data) { |
gfx::NativeViewAccessible View::GetNativeViewAccessible() { |
if (!native_view_accessibility_) |
- native_view_accessibility_ = NativeViewAccessibility::Create(this); |
+ native_view_accessibility_ = NativeViewAccessibility::CreateForView(this); |
if (native_view_accessibility_) |
return native_view_accessibility_->GetNativeObject(); |
- return NULL; |
+ return nullptr; |
} |
void View::NotifyAccessibilityEvent( |
@@ -1436,7 +1430,7 @@ void View::NotifyAccessibilityEvent( |
if (send_native_event && GetWidget()) { |
if (!native_view_accessibility_) |
- native_view_accessibility_ = NativeViewAccessibility::Create(this); |
+ native_view_accessibility_ = NativeViewAccessibility::CreateForView(this); |
if (native_view_accessibility_) |
native_view_accessibility_->NotifyAccessibilityEvent(event_type); |
} |