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

Unified Diff: chrome/browser/chromeos/arc/accessibility/arc_accessibility_helper_bridge.h

Issue 2559663002: Support focus highlight in Android window (Closed)
Patch Set: Address comments. Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/arc/accessibility/arc_accessibility_helper_bridge.h
diff --git a/chrome/browser/chromeos/arc/accessibility/arc_accessibility_helper_bridge.h b/chrome/browser/chromeos/arc/accessibility/arc_accessibility_helper_bridge.h
new file mode 100644
index 0000000000000000000000000000000000000000..ad4abbd6de288d9799682095e7acc1f9f4291808
--- /dev/null
+++ b/chrome/browser/chromeos/arc/accessibility/arc_accessibility_helper_bridge.h
@@ -0,0 +1,44 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_CHROMEOS_ARC_ACCESSIBILITY_ARC_ACCESSIBILITY_HELPER_BRIDGE_H_
+#define CHROME_BROWSER_CHROMEOS_ARC_ACCESSIBILITY_ARC_ACCESSIBILITY_HELPER_BRIDGE_H_
+
+#include "components/arc/arc_service.h"
+#include "components/arc/common/accessibility_helper.mojom.h"
+#include "components/arc/instance_holder.h"
+#include "mojo/public/cpp/bindings/binding.h"
+
+namespace arc {
+
+class ArcBridgeService;
+
+// ArcAccessibilityHelperBridge is an instance to receive converted Android
+// accessibility events and info via mojo interface and dispatch them to chrome
+// os components.
+class ArcAccessibilityHelperBridge
+ : public ArcService,
+ public mojom::AccessibilityHelperHost,
+ public InstanceHolder<mojom::AccessibilityHelperInstance>::Observer {
+ public:
+ explicit ArcAccessibilityHelperBridge(ArcBridgeService* bridge_service);
+ ~ArcAccessibilityHelperBridge() override;
+
+ // InstanceHolder<mojom::AccessibilityHelperInstance>::Observer overrides.
+ void OnInstanceReady() override;
+
+ // mojom::AccessibilityHelperHost overrides.
+ void OnAccessibilityEvent(
+ mojom::AccessibilityEventType event_type,
+ mojom::AccessibilityNodeInfoDataPtr event_source) override;
+
+ private:
+ mojo::Binding<mojom::AccessibilityHelperHost> binding_;
+
+ DISALLOW_COPY_AND_ASSIGN(ArcAccessibilityHelperBridge);
+};
+
+} // namespace arc
+
+#endif // CHROME_BROWSER_CHROMEOS_ARC_ACCESSIBILITY_ARC_ACCESSIBILITY_HELPER_BRIDGE_H_

Powered by Google App Engine
This is Rietveld 408576698