Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(40)

Side by Side Diff: chrome/browser/chromeos/arc/accessibility/arc_accessibility_helper_bridge.h

Issue 2640123004: Initial support for native accessibility in ARC (Closed)
Patch Set: Experimental changes Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_CHROMEOS_ARC_ACCESSIBILITY_ARC_ACCESSIBILITY_HELPER_BRIDG E_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_ARC_ACCESSIBILITY_ARC_ACCESSIBILITY_HELPER_BRIDG E_H_
6 #define CHROME_BROWSER_CHROMEOS_ARC_ACCESSIBILITY_ARC_ACCESSIBILITY_HELPER_BRIDG E_H_ 6 #define CHROME_BROWSER_CHROMEOS_ARC_ACCESSIBILITY_ARC_ACCESSIBILITY_HELPER_BRIDG E_H_
7 7
8 #include "components/arc/arc_service.h" 8 #include "components/arc/arc_service.h"
9 #include "components/arc/common/accessibility_helper.mojom.h" 9 #include "components/arc/common/accessibility_helper.mojom.h"
10 #include "components/arc/instance_holder.h" 10 #include "components/arc/instance_holder.h"
11 #include "mojo/public/cpp/bindings/binding.h" 11 #include "mojo/public/cpp/bindings/binding.h"
12 12
13 namespace arc { 13 namespace arc {
14 14
15 class ArcBridgeService; 15 class ArcBridgeService;
16 class AXTreeSourceArc;
16 17
17 // ArcAccessibilityHelperBridge is an instance to receive converted Android 18 // ArcAccessibilityHelperBridge is an instance to receive converted Android
18 // accessibility events and info via mojo interface and dispatch them to chrome 19 // accessibility events and info via mojo interface and dispatch them to chrome
19 // os components. 20 // os components.
20 class ArcAccessibilityHelperBridge 21 class ArcAccessibilityHelperBridge
21 : public ArcService, 22 : public ArcService,
22 public mojom::AccessibilityHelperHost, 23 public mojom::AccessibilityHelperHost,
23 public InstanceHolder<mojom::AccessibilityHelperInstance>::Observer { 24 public InstanceHolder<mojom::AccessibilityHelperInstance>::Observer {
24 public: 25 public:
25 explicit ArcAccessibilityHelperBridge(ArcBridgeService* bridge_service); 26 explicit ArcAccessibilityHelperBridge(ArcBridgeService* bridge_service);
26 ~ArcAccessibilityHelperBridge() override; 27 ~ArcAccessibilityHelperBridge() override;
27 28
28 // InstanceHolder<mojom::AccessibilityHelperInstance>::Observer overrides. 29 // InstanceHolder<mojom::AccessibilityHelperInstance>::Observer overrides.
29 void OnInstanceReady() override; 30 void OnInstanceReady() override;
30 31
31 // mojom::AccessibilityHelperHost overrides. 32 // mojom::AccessibilityHelperHost overrides.
32 void OnAccessibilityEvent( 33 void OnAccessibilityEvent(
33 mojom::AccessibilityEventType event_type, 34 mojom::AccessibilityEventDataPtr event_data) override;
34 mojom::AccessibilityNodeInfoDataPtr event_source) override;
35 35
36 private: 36 private:
37 mojo::Binding<mojom::AccessibilityHelperHost> binding_; 37 mojo::Binding<mojom::AccessibilityHelperHost> binding_;
38 38
39 std::unique_ptr<AXTreeSourceArc> tree_;
40
39 DISALLOW_COPY_AND_ASSIGN(ArcAccessibilityHelperBridge); 41 DISALLOW_COPY_AND_ASSIGN(ArcAccessibilityHelperBridge);
40 }; 42 };
41 43
42 } // namespace arc 44 } // namespace arc
43 45
44 #endif // CHROME_BROWSER_CHROMEOS_ARC_ACCESSIBILITY_ARC_ACCESSIBILITY_HELPER_BR IDGE_H_ 46 #endif // CHROME_BROWSER_CHROMEOS_ARC_ACCESSIBILITY_ARC_ACCESSIBILITY_HELPER_BR IDGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698