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

Unified Diff: mojo/services/ui/input/interfaces/input_connection.mojom

Issue 1552043002: Make Mozart view manager use the new compositor. (Closed) Base URL: git@github.com:domokit/mojo.git@moz-12
Patch Set: apply review feedback Created 4 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: mojo/services/ui/input/interfaces/input_connection.mojom
diff --git a/mojo/services/ui/input/interfaces/input_connection.mojom b/mojo/services/ui/input/interfaces/input_connection.mojom
new file mode 100644
index 0000000000000000000000000000000000000000..2746cb771675e8e2a749f60719de1fd65dcef46c
--- /dev/null
+++ b/mojo/services/ui/input/interfaces/input_connection.mojom
@@ -0,0 +1,35 @@
+// 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.
+
+[DartPackage="mojo_services"]
+module mojo.ui;
+
+// TODO(jeffbrown): Redesign input event representation later.
+import "mojo/services/input_events/interfaces/input_events.mojom";
+
+// The input connection service allows a view to receive input events
+// such as key presses and pointer movements.
+
+// This service can be retrieved from the |ViewHost| service provider.
+//
+// TODO(jeffbrown): Elaborate this. Particularly need to think about
+// how to handle focus and gestures.
+[ServiceName="mojo::ui::InputConnection"]
+interface InputConnection {
+ // Sets the listener for receiving input events.
+ //
+ // If |listener| is null, then the previously set listener is removed.
+ SetListener(InputListener? listener);
+};
+
+// An interface applications may implement to receive events from an
+// input connection.
+interface InputListener {
+ // Called to deliver an input event.
+ //
+ // The |consumed| result should indicate whether the input event was
+ // consumed by the connection. If |consumed| is false, the system may
+ // apply default behavior of its own in response to the event.
+ OnEvent(mojo.Event event) => (bool consumed);
+};
« no previous file with comments | « mojo/services/ui/input/interfaces/BUILD.gn ('k') | mojo/services/ui/input/interfaces/input_dispatcher.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698