1 // Copyright 2015 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_AURALINUX_H_
6 #define UI_ACCESSIBILITY_AX_PLATFORM_NODE_AURALINUX_H_
10 #include "base/memory/ref_counted.h"
11 #include "ui/accessibility/ax_export.h"
12 #include "ui/accessibility/platform/ax_platform_node_base.h"
20 // Implements accessibility on Aura Linux using ATK.
21 class AXPlatformNodeAuraLinux
: public AXPlatformNodeBase
{
23 AXPlatformNodeAuraLinux();
25 // Set or get the root-level Application object that's the parent of all
27 AX_EXPORT
static void SetApplication(AXPlatformNode
* application
);
28 static AXPlatformNode
* application() { return application_
; }
30 // Do static initialization using the given task runner for file operations.
31 AX_EXPORT
static void StaticInitialize(
32 scoped_refptr
<base::TaskRunner
> init_task_runner
);
35 void GetAtkState(AtkStateSet
* state_set
);
36 void GetAtkRelations(AtkRelationSet
* atk_relation_set
);
37 void GetExtents(gint
* x
, gint
* y
, gint
* width
, gint
* height
,
38 AtkCoordType coord_type
);
39 void GetPosition(gint
* x
, gint
* y
, AtkCoordType coord_type
);
40 void GetSize(gint
* width
, gint
* height
);
42 // AXPlatformNode overrides.
43 void Destroy() override
;
44 gfx::NativeViewAccessible
GetNativeViewAccessible() override
;
45 void NotifyAccessibilityEvent(ui::AXEvent event_type
) override
;
47 // AXPlatformNodeBase overrides.
48 void Init(AXPlatformNodeDelegate
* delegate
) override
;
49 int GetIndexInParent() override
;
52 ~AXPlatformNodeAuraLinux() override
;
54 // We own a reference to this ref-counted object.
55 AtkObject
* atk_object_
;
57 // The root-level Application object that's the parent of all
59 static AXPlatformNode
* application_
;
61 DISALLOW_COPY_AND_ASSIGN(AXPlatformNodeAuraLinux
);
66 #endif // UI_ACCESSIBILITY_AX_PLATFORM_NODE_AURALINUX_H_