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
;
18 class AXPlatformNodeMac
: public AXPlatformNodeBase
{
23 void Destroy() override
;
24 gfx::NativeViewAccessible
GetNativeViewAccessible() override
;
25 void NotifyAccessibilityEvent(ui::AXEvent event_type
) override
;
27 // AXPlatformNodeBase.
28 int GetIndexInParent() override
;
31 ~AXPlatformNodeMac() override
;
33 base::scoped_nsobject
<AXPlatformNodeCocoa
> native_node_
;
35 DISALLOW_COPY_AND_ASSIGN(AXPlatformNodeMac
);
41 @interface AXPlatformNodeCocoa
: NSObject
{
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
;
52 @
property(nonatomic
, readonly
) NSRect boundsInScreen
;
56 #endif // UI_ACCESSIBILITY_AX_PLATFORM_NODE_MAC_H_