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

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: |window| can be nullptr 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 OnAccessibilityEvent(
33 mojom::AccessibilityEventType event_type, 36 mojom::AccessibilityEventDataPtr event_data) override;
34 mojom::AccessibilityNodeInfoDataPtr event_source) override;
35 37
36 private: 38 private:
39 // exo::WMHelper::ActivationObserver overrides.
40 void OnWindowActivated(aura::Window* gained_active,
41 aura::Window* lost_active) override;
42
37 mojo::Binding<mojom::AccessibilityHelperHost> binding_; 43 mojo::Binding<mojom::AccessibilityHelperHost> binding_;
38 44
45 std::unique_ptr<AXTreeSourceArc> tree_;
dmazzoni 2017/02/09 01:18:09 Maybe tree_source_?
46
39 DISALLOW_COPY_AND_ASSIGN(ArcAccessibilityHelperBridge); 47 DISALLOW_COPY_AND_ASSIGN(ArcAccessibilityHelperBridge);
40 }; 48 };
41 49
42 } // namespace arc 50 } // namespace arc
43 51
44 #endif // CHROME_BROWSER_CHROMEOS_ARC_ACCESSIBILITY_ARC_ACCESSIBILITY_HELPER_BR IDGE_H_ 52 #endif // CHROME_BROWSER_CHROMEOS_ARC_ACCESSIBILITY_ARC_ACCESSIBILITY_HELPER_BR IDGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698