Revert "Fix broken channel icon in chrome://help on CrOS" and try again
[chromium-blink-merge.git] / ui / accessibility / platform / ax_platform_node_mac.h
blobed76335069ef3f2c3a1a4e2d693c8408d6c776d5
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
3 // found in the LICENSE file.
5 #ifndef UI_ACCESSIBILITY_AX_PLATFORM_NODE_MAC_H_
6 #define UI_ACCESSIBILITY_AX_PLATFORM_NODE_MAC_H_
8 #import <Foundation/Foundation.h>
10 #include "base/mac/scoped_nsobject.h"
11 #include "ui/accessibility/ax_export.h"
12 #include "ui/accessibility/platform/ax_platform_node_base.h"
14 @class AXPlatformNodeCocoa;
16 namespace ui {
18 class AXPlatformNodeMac : public AXPlatformNodeBase {
19 public:
20 AXPlatformNodeMac();
22 // AXPlatformNode.
23 void Destroy() override;
24 gfx::NativeViewAccessible GetNativeViewAccessible() override;
25 void NotifyAccessibilityEvent(ui::AXEvent event_type) override;
27 // AXPlatformNodeBase.
28 int GetIndexInParent() override;
30 private:
31 ~AXPlatformNodeMac() override;
33 base::scoped_nsobject<AXPlatformNodeCocoa> native_node_;
35 DISALLOW_COPY_AND_ASSIGN(AXPlatformNodeMac);
38 } // namespace ui
40 AX_EXPORT
41 @interface AXPlatformNodeCocoa : NSObject {
42 @private
43 ui::AXPlatformNodeBase* node_; // Weak. Retains us.
46 + (NSString*)nativeRoleFromAXRole:(ui::AXRole)role;
47 + (NSString*)nativeSubroleFromAXRole:(ui::AXRole)role;
49 - (instancetype)initWithNode:(ui::AXPlatformNodeBase*)node;
50 - (void)detach;
52 @property(nonatomic, readonly) NSRect boundsInScreen;
54 @end
56 #endif // UI_ACCESSIBILITY_AX_PLATFORM_NODE_MAC_H_