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

Unified Diff: ui/views/view.h

Issue 2715543003: Views a11y: Implement AXPlatformNode::FromNativeViewAccessible on all platforms. (Closed)
Patch Set: Make GetForView protected. 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/view.h
diff --git a/ui/views/view.h b/ui/views/view.h
index fcbee85c1bf2155eef7639c5b96e75c6980c1b4f..f68358bcd4fd8cf6e15424364e5ead38e2d5d743 100644
--- a/ui/views/view.h
+++ b/ui/views/view.h
@@ -36,6 +36,7 @@
#include "ui/gfx/geometry/vector2d.h"
#include "ui/gfx/native_widget_types.h"
#include "ui/gfx/path.h"
+#include "ui/views/accessibility/native_view_accessibility.h"
#include "ui/views/view_targeter.h"
#include "ui/views/views_export.h"
@@ -72,7 +73,6 @@ class DragController;
class FocusManager;
class FocusTraversable;
class LayoutManager;
-class NativeViewAccessibility;
class ScrollView;
class ViewObserver;
class Widget;
@@ -1259,6 +1259,9 @@ class VIEWS_EXPORT View : public ui::LayerDelegate,
friend class internal::RootView;
friend class internal::ScopedChildrenLock;
friend class FocusManager;
+#if !defined(PLATFORM_HAS_NATIVE_VIEW_ACCESSIBILITY_IMPL)
+ friend class NativeViewAccessibility;
+#endif
friend class ViewLayerTest;
friend class Widget;
@@ -1616,9 +1619,8 @@ class VIEWS_EXPORT View : public ui::LayerDelegate,
// Accessibility -------------------------------------------------------------
- // Belongs to this view, but it's reference-counted on some platforms
- // so we can't use a scoped_ptr. It's dereferenced in the destructor.
- NativeViewAccessibility* native_view_accessibility_;
+ // The accessibility element used to represent this View.
+ std::unique_ptr<NativeViewAccessibility> native_view_accessibility_;
// Observers -------------------------------------------------------------

Powered by Google App Engine
This is Rietveld 408576698