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

Unified Diff: ui/views/view.cc

Issue 2718073003: Views a11y: Convert View's NativeViewAccessibility to a unique_ptr. (Closed)
Patch Set: Fix long lived NVA in test. Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/view.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/view.cc
diff --git a/ui/views/view.cc b/ui/views/view.cc
index 04c5f2fae25957c3ca3b706654e263fc8b3c6638..210d2fcca70d724bef866d3171feb3bb47b8de81 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 -------------------------------------------------------------
@@ -1425,7 +1419,7 @@ gfx::NativeViewAccessible View::GetNativeViewAccessible() {
native_view_accessibility_ = NativeViewAccessibility::Create(this);
if (native_view_accessibility_)
return native_view_accessibility_->GetNativeObject();
- return NULL;
+ return nullptr;
}
void View::NotifyAccessibilityEvent(
« no previous file with comments | « ui/views/view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698