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

Unified Diff: components/mus/input_devices/public/interfaces/input_devices.mojom

Issue 1992443002: Add Mojo IPC based input-device service. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cleanup_ddm
Patch Set: Updated. Created 4 years, 7 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: components/mus/input_devices/public/interfaces/input_devices.mojom
diff --git a/components/mus/input_devices/public/interfaces/input_devices.mojom b/components/mus/input_devices/public/interfaces/input_devices.mojom
new file mode 100644
index 0000000000000000000000000000000000000000..378f3bddff9c80cd4099f4fb7d823aa28cf848dc
--- /dev/null
+++ b/components/mus/input_devices/public/interfaces/input_devices.mojom
@@ -0,0 +1,70 @@
+// Copyright 2016 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.
+
+module input_device.mojom;
Ben Goodger (Google) 2016/06/02 18:06:44 this dir should be in: components/mus/public/inte
+
+import "ui/gfx/geometry/mojo/geometry.mojom";
+
+enum InputDeviceType {
+ INPUT_DEVICE_INTERNAL, // Internally connected input device.
+ INPUT_DEVICE_EXTERNAL, // Known externally connected input device.
+ INPUT_DEVICE_UNKNOWN, // Device that may or may not be an external device.
+};
+
+struct InputDevice {
+ // ID of the device. This ID is unique between all input devices.
+ int32 id;
+
+ // The type of the input device.
+ InputDeviceType type;
+
+ // Name of the device.
+ string name;
+
+ // The path to the input device in the sysfs filesystem.
+ string sys_path;
+
+ // USB-style device identifiers, where available, or 0 if unavailable.
+ uint16 vendor_id;
+ uint16 product_id;
+};
+
+// TODO(kylechar): Don't repeat all the fields here, maybe just use composition.
+struct TouchscreenDevice {
+ // ID of the device. This ID is unique between all input devices.
+ int32 id;
+
+ // The type of the input device.
+ InputDeviceType type;
+
+ // Name of the device.
+ string name;
+
+ // The path to the input device in the sysfs filesystem.
+ string sys_path;
+
+ // USB-style device identifiers, where available, or 0 if unavailable.
+ uint16 vendor_id;
+ uint16 product_id;
+
+ // Size of the touch screen area.
+ mojo.Size size;
+
+ // The number of touch points this device supports, or 0 if unknown.
+ int32 touch_points;
+};
+
+interface InputDeviceObserverMojo {
+ OnKeyboardDeviceConfigurationChanged(array<InputDevice> devices);
+ OnTouchscreenDeviceConfigurationChanged(array<TouchscreenDevice> devices);
+ OnMouseDeviceConfigurationChanged(array<InputDevice> devices);
+ OnTouchpadDeviceConfigurationChanged(array<InputDevice> devices);
+ OnDeviceListsComplete();
+};
+
+interface InputDeviceServer {
+ // Adds an InputDeviceObserverMojo in another process as an observer to get
+ // notified of changes to input-devices over Mojo IPC.
+ AddObserver(InputDeviceObserverMojo observer);
+};
« no previous file with comments | « components/mus/input_devices/public/interfaces/OWNERS ('k') | components/mus/input_devices/touchscreen_device.typemap » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698