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

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

Issue 1552043002: Make Mozart view manager use the new compositor. (Closed) Base URL: git@github.com:domokit/mojo.git@moz-12
Patch Set: Created 4 years, 12 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_dispatcher.mojom
diff --git a/mojo/services/ui/input/interfaces/input_dispatcher.mojom b/mojo/services/ui/input/interfaces/input_dispatcher.mojom
new file mode 100644
index 0000000000000000000000000000000000000000..75caef51fbfd8162e403be3f6d5978c9380db9d6
--- /dev/null
+++ b/mojo/services/ui/input/interfaces/input_dispatcher.mojom
@@ -0,0 +1,40 @@
+// 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 dispatcher service allows the component which owns and controls
+// a view tree to dispatch input events to the views that it contains.
+//
+// This service can be retrieved from the |ViewTreeHost| service provider.
+//
+// TODO(jeffbrown): Elaborate how input devices are registered with the
+// dispatcher so that applications can query their capabilities and distinguish
+// input coming from multiple sources concurrently.
+[ServiceName="mojo::ui::InputDispatcher"]
+interface InputDispatcher {
+ // Dispatches an event through the view tree. The dispatcher will deliver
+ // the event to the appropriate views based on the current state of the
+ // tree, such as focus and the structure of the scene graph.
+ //
+ // The dispatcher expects the stream of events that it receives to be
+ // internally consistent. For example, each pointer down must be matched
+ // by a corresponding pointer up.
+ //
+ // It is an error to supply an inconsistent stream events to the dispatcher;
+ // the connection will be closed.
+ //
+ // TODO(jeffbrown): Is this the right policy? It would certainly help
+ // diagnose faults earlier.
+ // TODO(jeffbrown): Decide whether there should be a way to track the
+ // progress of input events. For testing purposes it is often desirable
+ // to block the test until a sequence of events have been delivered and
+ // handled. However these same mechanisms have proven to be brittle in
+ // the past so it might be better to solve the problem some other way.
+ DispatchEvent(mojo.Event event);
abarth 2016/01/10 01:42:54 I guess it's up to the InputDispatcher to decide w
jeffbrown 2016/01/26 05:59:12 Yup. It owns all of the policy, this is just the
+};

Powered by Google App Engine
This is Rietveld 408576698