OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_ACCESSIBILITY_AX_PLATFORM_NODE_MAC_H_ | 5 #ifndef UI_ACCESSIBILITY_AX_PLATFORM_NODE_MAC_H_ |
6 #define UI_ACCESSIBILITY_AX_PLATFORM_NODE_MAC_H_ | 6 #define UI_ACCESSIBILITY_AX_PLATFORM_NODE_MAC_H_ |
7 | 7 |
8 #import <Foundation/Foundation.h> | 8 #import <Foundation/Foundation.h> |
9 | 9 |
10 #include "base/mac/scoped_nsobject.h" | 10 #include "base/mac/scoped_nsobject.h" |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "ui/accessibility/ax_export.h" | 12 #include "ui/accessibility/ax_export.h" |
13 #include "ui/accessibility/platform/ax_platform_node_base.h" | 13 #include "ui/accessibility/platform/ax_platform_node_base.h" |
14 | 14 |
15 @class AXPlatformNodeCocoa; | 15 @class AXPlatformNodeCocoa; |
16 | 16 |
17 namespace ui { | 17 namespace ui { |
18 | 18 |
19 class AXPlatformNodeMac : public AXPlatformNodeBase { | 19 class AXPlatformNodeMac : public AXPlatformNodeBase { |
20 public: | 20 public: |
21 AXPlatformNodeMac(); | 21 AXPlatformNodeMac(); |
22 | 22 |
23 // AXPlatformNode. | 23 // AXPlatformNode. |
24 void Destroy() override; | |
25 gfx::NativeViewAccessible GetNativeViewAccessible() override; | 24 gfx::NativeViewAccessible GetNativeViewAccessible() override; |
26 void NotifyAccessibilityEvent(ui::AXEvent event_type) override; | 25 void NotifyAccessibilityEvent(ui::AXEvent event_type) override; |
27 | 26 |
28 // AXPlatformNodeBase. | 27 // AXPlatformNodeBase. |
| 28 void Destroy() override; |
29 int GetIndexInParent() override; | 29 int GetIndexInParent() override; |
30 | 30 |
31 private: | 31 private: |
32 ~AXPlatformNodeMac() override; | 32 ~AXPlatformNodeMac() override; |
33 | 33 |
34 base::scoped_nsobject<AXPlatformNodeCocoa> native_node_; | 34 base::scoped_nsobject<AXPlatformNodeCocoa> native_node_; |
35 | 35 |
36 DISALLOW_COPY_AND_ASSIGN(AXPlatformNodeMac); | 36 DISALLOW_COPY_AND_ASSIGN(AXPlatformNodeMac); |
37 }; | 37 }; |
38 | 38 |
39 } // namespace ui | 39 } // namespace ui |
40 | 40 |
41 AX_EXPORT | 41 AX_EXPORT |
42 @interface AXPlatformNodeCocoa : NSObject { | 42 @interface AXPlatformNodeCocoa : NSObject { |
43 @private | 43 @private |
44 ui::AXPlatformNodeBase* node_; // Weak. Retains us. | 44 ui::AXPlatformNodeBase* node_; // Weak. Retains us. |
45 } | 45 } |
46 | 46 |
47 + (NSString*)nativeRoleFromAXRole:(ui::AXRole)role; | 47 + (NSString*)nativeRoleFromAXRole:(ui::AXRole)role; |
48 + (NSString*)nativeSubroleFromAXRole:(ui::AXRole)role; | 48 + (NSString*)nativeSubroleFromAXRole:(ui::AXRole)role; |
49 | 49 |
50 - (instancetype)initWithNode:(ui::AXPlatformNodeBase*)node; | 50 - (instancetype)initWithNode:(ui::AXPlatformNodeBase*)node; |
51 - (void)detach; | 51 - (void)detach; |
52 | 52 |
53 @property(nonatomic, readonly) NSRect boundsInScreen; | 53 @property(nonatomic, readonly) NSRect boundsInScreen; |
54 | 54 |
55 @end | 55 @end |
56 | 56 |
57 #endif // UI_ACCESSIBILITY_AX_PLATFORM_NODE_MAC_H_ | 57 #endif // UI_ACCESSIBILITY_AX_PLATFORM_NODE_MAC_H_ |
OLD | NEW |