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

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: Address various feedback. 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 "components/exo/wm_helper.h"
11 #include "mojo/public/cpp/bindings/binding.h" 12 #include "mojo/public/cpp/bindings/binding.h"
12 13
13 namespace arc { 14 namespace arc {
14 15
15 class ArcBridgeService; 16 class ArcBridgeService;
17 class AXTreeSourceArc;
16 18
17 // ArcAccessibilityHelperBridge is an instance to receive converted Android 19 // ArcAccessibilityHelperBridge is an instance to receive converted Android
18 // accessibility events and info via mojo interface and dispatch them to chrome 20 // accessibility events and info via mojo interface and dispatch them to chrome
19 // os components. 21 // os components.
20 class ArcAccessibilityHelperBridge 22 class ArcAccessibilityHelperBridge
21 : public ArcService, 23 : public ArcService,
22 public mojom::AccessibilityHelperHost, 24 public mojom::AccessibilityHelperHost,
23 public InstanceHolder<mojom::AccessibilityHelperInstance>::Observer { 25 public InstanceHolder<mojom::AccessibilityHelperInstance>::Observer,
26 public exo::WMHelper::ActivationObserver {
24 public: 27 public:
25 explicit ArcAccessibilityHelperBridge(ArcBridgeService* bridge_service); 28 explicit ArcAccessibilityHelperBridge(ArcBridgeService* bridge_service);
26 ~ArcAccessibilityHelperBridge() override; 29 ~ArcAccessibilityHelperBridge() override;
27 30
28 // InstanceHolder<mojom::AccessibilityHelperInstance>::Observer overrides. 31 // InstanceHolder<mojom::AccessibilityHelperInstance>::Observer overrides.
29 void OnInstanceReady() override; 32 void OnInstanceReady() override;
30 33
31 // mojom::AccessibilityHelperHost overrides. 34 // mojom::AccessibilityHelperHost overrides.
32 void OnAccessibilityEvent( 35 void OnAccessibilityEventDeprecated(
33 mojom::AccessibilityEventType event_type, 36 mojom::AccessibilityEventType event_type,
34 mojom::AccessibilityNodeInfoDataPtr event_source) override; 37 mojom::AccessibilityNodeInfoDataPtr event_source) override;
38 void OnAccessibilityEvent(
39 mojom::AccessibilityEventDataPtr event_data) override;
35 40
36 private: 41 private:
42 // exo::WMHelper::ActivationObserver overrides.
43 void OnWindowActivated(aura::Window* gained_active,
44 aura::Window* lost_active) override;
45
37 mojo::Binding<mojom::AccessibilityHelperHost> binding_; 46 mojo::Binding<mojom::AccessibilityHelperHost> binding_;
38 47
48 std::unique_ptr<AXTreeSourceArc> tree_source_;
49
39 DISALLOW_COPY_AND_ASSIGN(ArcAccessibilityHelperBridge); 50 DISALLOW_COPY_AND_ASSIGN(ArcAccessibilityHelperBridge);
40 }; 51 };
41 52
42 } // namespace arc 53 } // namespace arc
43 54
44 #endif // CHROME_BROWSER_CHROMEOS_ARC_ACCESSIBILITY_ARC_ACCESSIBILITY_HELPER_BR IDGE_H_ 55 #endif // CHROME_BROWSER_CHROMEOS_ARC_ACCESSIBILITY_ARC_ACCESSIBILITY_HELPER_BR IDGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698