Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / ui / accessibility / platform / ax_platform_node_auralinux.h
blob1c1fd8a6c98d7cd3b49e70480525c64d40c57ec1
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_
8 #include <atk/atk.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"
14 namespace base {
15 class TaskRunner;
18 namespace ui {
20 // Implements accessibility on Aura Linux using ATK.
21 class AXPlatformNodeAuraLinux : public AXPlatformNodeBase {
22 public:
23 AXPlatformNodeAuraLinux();
25 // Set or get the root-level Application object that's the parent of all
26 // top-level windows.
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);
34 AtkRole GetAtkRole();
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 void SetExtentsRelativeToAtkCoordinateType(
43 gint* x, gint* y, gint* width, gint* height,
44 AtkCoordType coord_type);
46 // AXPlatformNode overrides.
47 void Destroy() override;
48 gfx::NativeViewAccessible GetNativeViewAccessible() override;
49 void NotifyAccessibilityEvent(ui::AXEvent event_type) override;
51 // AXPlatformNodeBase overrides.
52 void Init(AXPlatformNodeDelegate* delegate) override;
53 int GetIndexInParent() override;
55 private:
56 ~AXPlatformNodeAuraLinux() override;
58 // We own a reference to this ref-counted object.
59 AtkObject* atk_object_;
61 // The root-level Application object that's the parent of all
62 // top-level windows.
63 static AXPlatformNode* application_;
65 DISALLOW_COPY_AND_ASSIGN(AXPlatformNodeAuraLinux);
68 } // namespace ui
70 #endif // UI_ACCESSIBILITY_AX_PLATFORM_NODE_AURALINUX_H_