| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 #ifndef UI_VIEWS_ACCESSIBILITY_NATIVE_VIEW_ACCESSIBILITY_BASE_H_ | 5 #ifndef UI_VIEWS_ACCESSIBILITY_NATIVE_VIEW_ACCESSIBILITY_BASE_H_ |
| 6 #define UI_VIEWS_ACCESSIBILITY_NATIVE_VIEW_ACCESSIBILITY_BASE_H_ | 6 #define UI_VIEWS_ACCESSIBILITY_NATIVE_VIEW_ACCESSIBILITY_BASE_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "build/build_config.h" | 11 #include "build/build_config.h" |
| 12 #include "ui/accessibility/ax_action_data.h" | 12 #include "ui/accessibility/ax_action_data.h" |
| 13 #include "ui/accessibility/ax_node_data.h" | 13 #include "ui/accessibility/ax_node_data.h" |
| 14 #include "ui/accessibility/ax_tree_data.h" |
| 14 #include "ui/accessibility/platform/ax_platform_node.h" | 15 #include "ui/accessibility/platform/ax_platform_node.h" |
| 15 #include "ui/accessibility/platform/ax_platform_node_delegate.h" | 16 #include "ui/accessibility/platform/ax_platform_node_delegate.h" |
| 16 #include "ui/gfx/native_widget_types.h" | 17 #include "ui/gfx/native_widget_types.h" |
| 17 #include "ui/views/accessibility/native_view_accessibility.h" | 18 #include "ui/views/accessibility/native_view_accessibility.h" |
| 18 #include "ui/views/views_export.h" | 19 #include "ui/views/views_export.h" |
| 19 #include "ui/views/widget/widget_observer.h" | 20 #include "ui/views/widget/widget_observer.h" |
| 20 | 21 |
| 21 namespace views { | 22 namespace views { |
| 22 | 23 |
| 23 class View; | 24 class View; |
| 24 class Widget; | 25 class Widget; |
| 25 | 26 |
| 26 // Shared base class for platforms that require an implementation of | 27 // Shared base class for platforms that require an implementation of |
| 27 // NativeViewAccessibility to interface with the native accessibility toolkit. | 28 // NativeViewAccessibility to interface with the native accessibility toolkit. |
| 28 class VIEWS_EXPORT NativeViewAccessibilityBase | 29 class VIEWS_EXPORT NativeViewAccessibilityBase |
| 29 : public NativeViewAccessibility, | 30 : public NativeViewAccessibility, |
| 30 public ui::AXPlatformNodeDelegate, | 31 public ui::AXPlatformNodeDelegate, |
| 31 public WidgetObserver { | 32 public WidgetObserver { |
| 32 public: | 33 public: |
| 33 ~NativeViewAccessibilityBase() override; | 34 ~NativeViewAccessibilityBase() override; |
| 34 | 35 |
| 35 // NativeViewAccessibility: | 36 // NativeViewAccessibility: |
| 36 gfx::NativeViewAccessible GetNativeObject() override; | 37 gfx::NativeViewAccessible GetNativeObject() override; |
| 37 void NotifyAccessibilityEvent(ui::AXEvent event_type) override; | 38 void NotifyAccessibilityEvent(ui::AXEvent event_type) override; |
| 38 | 39 |
| 39 // ui::AXPlatformNodeDelegate | 40 // ui::AXPlatformNodeDelegate |
| 40 const ui::AXNodeData& GetData() const override; | 41 const ui::AXNodeData& GetData() const override; |
| 42 const ui::AXTreeData& GetTreeData() const override; |
| 41 int GetChildCount() override; | 43 int GetChildCount() override; |
| 42 gfx::NativeViewAccessible ChildAtIndex(int index) override; | 44 gfx::NativeViewAccessible ChildAtIndex(int index) override; |
| 43 gfx::NativeWindow GetTopLevelWidget() override; | 45 gfx::NativeWindow GetTopLevelWidget() override; |
| 44 gfx::NativeViewAccessible GetParent() override; | 46 gfx::NativeViewAccessible GetParent() override; |
| 45 gfx::Rect GetScreenBoundsRect() const override; | 47 gfx::Rect GetScreenBoundsRect() const override; |
| 46 gfx::NativeViewAccessible HitTestSync(int x, int y) override; | 48 gfx::NativeViewAccessible HitTestSync(int x, int y) override; |
| 47 gfx::NativeViewAccessible GetFocus() override; | 49 gfx::NativeViewAccessible GetFocus() override; |
| 48 gfx::AcceleratedWidget GetTargetForNativeAccessibilityEvent() override; | 50 gfx::AcceleratedWidget GetTargetForNativeAccessibilityEvent() override; |
| 49 bool AccessibilityPerformAction(const ui::AXActionData& data) override; | 51 bool AccessibilityPerformAction(const ui::AXActionData& data) override; |
| 50 bool ShouldIgnoreHoveredStateForTesting() override; | 52 bool ShouldIgnoreHoveredStateForTesting() override; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 77 ui::AXPlatformNode* ax_node_; | 79 ui::AXPlatformNode* ax_node_; |
| 78 | 80 |
| 79 mutable ui::AXNodeData data_; | 81 mutable ui::AXNodeData data_; |
| 80 | 82 |
| 81 DISALLOW_COPY_AND_ASSIGN(NativeViewAccessibilityBase); | 83 DISALLOW_COPY_AND_ASSIGN(NativeViewAccessibilityBase); |
| 82 }; | 84 }; |
| 83 | 85 |
| 84 } // namespace views | 86 } // namespace views |
| 85 | 87 |
| 86 #endif // UI_VIEWS_ACCESSIBILITY_NATIVE_VIEW_ACCESSIBILITY_BASE_H_ | 88 #endif // UI_VIEWS_ACCESSIBILITY_NATIVE_VIEW_ACCESSIBILITY_BASE_H_ |
| OLD | NEW |