1 // Copyright (c) 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 CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_AURALINUX_H_
6 #define CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_AURALINUX_H_
10 #include "base/compiler_specific.h"
11 #include "content/browser/accessibility/browser_accessibility.h"
15 class BrowserAccessibilityAuraLinux
;
16 class BrowserAccessibilityManagerAuraLinux
;
20 #define BROWSER_ACCESSIBILITY_TYPE (browser_accessibility_get_type())
21 #define BROWSER_ACCESSIBILITY(obj) \
22 (G_TYPE_CHECK_INSTANCE_CAST((obj), BROWSER_ACCESSIBILITY_TYPE, \
23 BrowserAccessibilityAtk))
24 #define BROWSER_ACCESSIBILITY_CLASS(klass) \
25 (G_TYPE_CHECK_CLASS_CAST((klass), BROWSER_ACCESSIBILITY_TYPE, \
26 BrowserAccessibilityAtkClass))
27 #define IS_BROWSER_ACCESSIBILITY(obj) \
28 (G_TYPE_CHECK_INSTANCE_TYPE((obj), BROWSER_ACCESSIBILITY_TYPE))
29 #define IS_BROWSER_ACCESSIBILITY_CLASS(klass) \
30 (G_TYPE_CHECK_CLASS_TYPE((klass), BROWSER_ACCESSIBILITY_TYPE))
31 #define BROWSER_ACCESSIBILITY_GET_CLASS(obj) \
32 (G_TYPE_INSTANCE_GET_CLASS((obj), BROWSER_ACCESSIBILITY_TYPE, \
33 BrowserAccessibilityAtkClass))
35 typedef struct _BrowserAccessibilityAtk BrowserAccessibilityAtk
;
36 typedef struct _BrowserAccessibilityAtkClass BrowserAccessibilityAtkClass
;
38 struct _BrowserAccessibilityAtk
{
40 BrowserAccessibilityAuraLinux
* m_object
;
43 struct _BrowserAccessibilityAtkClass
{
44 AtkObjectClass parent_class
;
47 GType
browser_accessibility_get_type(void) G_GNUC_CONST
;
49 BrowserAccessibilityAtk
* browser_accessibility_new(
50 BrowserAccessibilityAuraLinux
* object
);
52 BrowserAccessibilityAuraLinux
* browser_accessibility_get_object(
53 BrowserAccessibilityAtk
* atk_object
);
55 void browser_accessibility_detach(BrowserAccessibilityAtk
* atk_object
);
57 AtkObject
* browser_accessibility_get_focused_element(
58 BrowserAccessibilityAtk
* atk_object
);
62 class BrowserAccessibilityAuraLinux
: public BrowserAccessibility
{
64 BrowserAccessibilityAuraLinux();
66 ~BrowserAccessibilityAuraLinux() override
;
68 AtkObject
* GetAtkObject() const;
70 AtkRole
atk_role() { return atk_role_
; }
72 // BrowserAccessibility methods.
73 void OnDataChanged() override
;
74 bool IsNative() const override
;
77 virtual void InitRoleAndState();
79 // Give BrowserAccessibility::Create access to our constructor.
80 friend class BrowserAccessibility
;
82 AtkObject
* atk_object_
;
87 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityAuraLinux
);
90 } // namespace content
92 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_AURALINUX_H_