Chromium Code Reviews| 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_H_ | 5 #ifndef UI_VIEWS_ACCESSIBILITY_NATIVE_VIEW_ACCESSIBILITY_H_ |
| 6 #define UI_VIEWS_ACCESSIBILITY_NATIVE_VIEW_ACCESSIBILITY_H_ | 6 #define UI_VIEWS_ACCESSIBILITY_NATIVE_VIEW_ACCESSIBILITY_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 #include "ui/accessibility/ax_action_data.h" | 10 #include "ui/accessibility/ax_action_data.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 42 | 42 |
| 43 // Call Destroy rather than deleting this, because the subclass may | 43 // Call Destroy rather than deleting this, because the subclass may |
| 44 // use reference counting. | 44 // use reference counting. |
| 45 virtual void Destroy(); | 45 virtual void Destroy(); |
| 46 | 46 |
| 47 void NotifyAccessibilityEvent(ui::AXEvent event_type); | 47 void NotifyAccessibilityEvent(ui::AXEvent event_type); |
| 48 | 48 |
| 49 // Focuses or unfocuses a View. | 49 // Focuses or unfocuses a View. |
| 50 bool SetFocused(bool focused); | 50 bool SetFocused(bool focused); |
| 51 | 51 |
| 52 // ui::AXPlatformNodeDelegate | 52 #if defined(OS_MACOSX) |
| 53 // Checks if there are any keyboard focusable ancestors. | |
| 54 bool HasFocusableAncestor(); | |
|
tapted
2016/11/25 04:36:27
can this be moved to an anonymous namespace in the
Patti Lor
2016/11/28 06:40:23
Good idea, thanks! I actually realised that just u
| |
| 55 #endif | |
| 56 | |
| 57 // ui::AXPlatformNodeDelegate: | |
| 53 const ui::AXNodeData& GetData() override; | 58 const ui::AXNodeData& GetData() override; |
| 54 int GetChildCount() override; | 59 int GetChildCount() override; |
| 55 gfx::NativeViewAccessible ChildAtIndex(int index) override; | 60 gfx::NativeViewAccessible ChildAtIndex(int index) override; |
| 56 gfx::NativeWindow GetTopLevelWidget() override; | 61 gfx::NativeWindow GetTopLevelWidget() override; |
| 57 gfx::NativeViewAccessible GetParent() override; | 62 gfx::NativeViewAccessible GetParent() override; |
| 58 gfx::Vector2d GetGlobalCoordinateOffset() override; | 63 gfx::Vector2d GetGlobalCoordinateOffset() override; |
| 59 gfx::NativeViewAccessible HitTestSync(int x, int y) override; | 64 gfx::NativeViewAccessible HitTestSync(int x, int y) override; |
| 60 gfx::NativeViewAccessible GetFocus() override; | 65 gfx::NativeViewAccessible GetFocus() override; |
| 61 gfx::AcceleratedWidget GetTargetForNativeAccessibilityEvent() override; | 66 gfx::AcceleratedWidget GetTargetForNativeAccessibilityEvent() override; |
| 62 bool AccessibilityPerformAction(const ui::AXActionData& data) override; | 67 bool AccessibilityPerformAction(const ui::AXActionData& data) override; |
| 63 void DoDefaultAction() override; | 68 void DoDefaultAction() override; |
| 64 | 69 |
| 65 // WidgetObserver | 70 // WidgetObserver: |
| 66 void OnWidgetDestroying(Widget* widget) override; | 71 void OnWidgetDestroying(Widget* widget) override; |
| 67 | 72 |
| 68 Widget* parent_widget() const { return parent_widget_; } | 73 Widget* parent_widget() const { return parent_widget_; } |
| 69 void SetParentWidget(Widget* parent_widget); | 74 void SetParentWidget(Widget* parent_widget); |
| 70 | 75 |
| 71 protected: | 76 protected: |
| 72 NativeViewAccessibility(View* view); | 77 NativeViewAccessibility(View* view); |
| 73 ~NativeViewAccessibility() override; | 78 ~NativeViewAccessibility() override; |
| 74 | 79 |
| 75 // Weak. Owns this. | 80 // Weak. Owns this. |
| (...skipping 12 matching lines...) Expand all Loading... | |
| 88 ui::AXPlatformNode* ax_node_; | 93 ui::AXPlatformNode* ax_node_; |
| 89 | 94 |
| 90 ui::AXNodeData data_; | 95 ui::AXNodeData data_; |
| 91 | 96 |
| 92 DISALLOW_COPY_AND_ASSIGN(NativeViewAccessibility); | 97 DISALLOW_COPY_AND_ASSIGN(NativeViewAccessibility); |
| 93 }; | 98 }; |
| 94 | 99 |
| 95 } // namespace views | 100 } // namespace views |
| 96 | 101 |
| 97 #endif // UI_VIEWS_ACCESSIBILITY_NATIVE_VIEW_ACCESSIBILITY_H_ | 102 #endif // UI_VIEWS_ACCESSIBILITY_NATIVE_VIEW_ACCESSIBILITY_H_ |
| OLD | NEW |