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

Unified Diff: components/arc/input/arc_input_bridge.h

Issue 1408263006: chromeos: Add ArcInputBridge to components/arc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@arcxx
Patch Set: nit fix Created 5 years 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
« no previous file with comments | « components/arc/input/DEPS ('k') | components/arc/input/arc_input_bridge_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/arc/input/arc_input_bridge.h
diff --git a/components/arc/input/arc_input_bridge.h b/components/arc/input/arc_input_bridge.h
new file mode 100644
index 0000000000000000000000000000000000000000..1082dc47c3d65c3a3722f3a75d29adfd39786911
--- /dev/null
+++ b/components/arc/input/arc_input_bridge.h
@@ -0,0 +1,43 @@
+// Copyright 2015 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 COMPONENTS_EXO_ARC_INPUT_ARC_INPUT_BRIDGE_H_
+#define COMPONENTS_EXO_ARC_INPUT_ARC_INPUT_BRIDGE_H_
+
+#include "base/macros.h"
+#include "components/arc/arc_bridge_service.h"
+
+namespace arc {
+
+class ArcBridgeService;
+
+// The ArcInputBridge is responsible for sending input events from ARC windows
+// to the ARC instance.
+// It hooks into aura::Env to watch for ExoSurface windows that are running ARC
+// applications. On those windows the input bridge will attach an EventPreTarget
+// to capture all input events.
+// To send those events to the ARC instance it will create bridge input devices
+// through the ArcBridgeService, which will provide a file descriptor to which
+// we can send linux input_event's.
+// ui::Events to the ARC windows are translated to linux input_event's, which
+// are then sent through the respective file descriptor.
+class ArcInputBridge {
+ public:
+ virtual ~ArcInputBridge() {}
+
+ // Creates a new instance of ArcInputBridge. It will register an Observer
+ // with aura::Env and the ArcBridgeService.
+ static scoped_ptr<ArcInputBridge> Create(
+ ArcBridgeService* arc_bridge_service);
+
+ protected:
+ ArcInputBridge() {}
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ArcInputBridge);
+};
+
+} // namespace arc
+
+#endif // COMPONENTS_EXO_ARC_INPUT_ARC_INPUT_BRIDGE_H_
« no previous file with comments | « components/arc/input/DEPS ('k') | components/arc/input/arc_input_bridge_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698