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

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
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..ecb83af124b6f28d8226d2c62a7a4f35baf91ef0
--- /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(){};
reveman 2015/12/05 00:48:45 nit: virtual ~ArcInputBridge() {}
denniskempin 2015/12/05 01:17:56 Done.
+
+ // 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);
reveman 2015/12/05 00:48:45 Not a huge fan of having a factory method when the
denniskempin 2015/12/05 01:17:56 we would like to keep the includes from the implem
+
+ protected:
+ ArcInputBridge(){};
reveman 2015/12/05 00:48:45 nit: ArcInputBridge() {}
denniskempin 2015/12/05 01:17:56 Done. For real this time.
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ArcInputBridge);
+};
+
+} // namespace arc
+
+#endif // COMPONENTS_EXO_ARC_INPUT_ARC_INPUT_BRIDGE_H_

Powered by Google App Engine
This is Rietveld 408576698