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

Unified Diff: ui/views/accessibility/native_view_accessibility.h

Issue 2718073003: Views a11y: Convert View's NativeViewAccessibility to a unique_ptr. (Closed)
Patch Set: Fix compile error. 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
Index: ui/views/accessibility/native_view_accessibility.h
diff --git a/ui/views/accessibility/native_view_accessibility.h b/ui/views/accessibility/native_view_accessibility.h
index df9880e44b331627cf5fb4aa470591fcef6c7c53..8403bb4915305cc5a3e4edd8367c2881f1769428 100644
--- a/ui/views/accessibility/native_view_accessibility.h
+++ b/ui/views/accessibility/native_view_accessibility.h
@@ -5,6 +5,8 @@
#ifndef UI_VIEWS_ACCESSIBILITY_NATIVE_VIEW_ACCESSIBILITY_H_
#define UI_VIEWS_ACCESSIBILITY_NATIVE_VIEW_ACCESSIBILITY_H_
+#include <memory>
+
#include "base/macros.h"
#include "build/build_config.h"
#include "ui/accessibility/ax_action_data.h"
@@ -40,13 +42,11 @@ class VIEWS_EXPORT NativeViewAccessibility
: public ui::AXPlatformNodeDelegate,
public WidgetObserver {
public:
- static NativeViewAccessibility* Create(View* view);
+ static std::unique_ptr<NativeViewAccessibility> Create(View* view);
- gfx::NativeViewAccessible GetNativeObject();
+ ~NativeViewAccessibility() override;
- // Call Destroy rather than deleting this, because the subclass may
- // use reference counting.
- virtual void Destroy();
+ gfx::NativeViewAccessible GetNativeObject();
void NotifyAccessibilityEvent(ui::AXEvent event_type);
@@ -74,7 +74,6 @@ class VIEWS_EXPORT NativeViewAccessibility
protected:
NativeViewAccessibility(View* view);
tapted 2017/02/28 06:29:12 nit: this should be declared explicit..
Patti Lor 2017/02/28 22:24:24 Thanks for always picking these up, I always miss
- ~NativeViewAccessibility() override;
// Weak. Owns this.
View* view_;

Powered by Google App Engine
This is Rietveld 408576698