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

Unified Diff: components/input_device_service/input_device_service.mojom

Issue 1992443002: Add Mojo IPC based input-device service. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cleanup_ddm
Patch Set: Clean up/move files. 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/input_device_service/input_device_service.mojom
diff --git a/components/input_device_service/input_device_service.mojom b/components/input_device_service/input_device_service.mojom
new file mode 100644
index 0000000000000000000000000000000000000000..e673161d759328d47ba129a1c4bf32e6a74366cd
--- /dev/null
+++ b/components/input_device_service/input_device_service.mojom
@@ -0,0 +1,53 @@
+// 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;
+
+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;
+};
+
+interface InputDeviceObserver {
+ OnKeyboardDeviceConfigurationChanged(array<InputDevice> devices);
+ OnTouchscreenDeviceConfigurationChanged(array<InputDevice> devices);
+ OnMouseDeviceConfigurationChanged(array<InputDevice> devices);
+ OnTouchpadDeviceConfigurationChanged(array<InputDevice> devices);
+};
+
+interface InputDeviceService {
+ // Adds an observer to be notified of changes to input devices over Mojo IPC.
+ AddObserver(InputDeviceObserver observer);
+
+ // Gets list of keyboard input devices.
+ GetKeyboardDevices() => (array<InputDevice> devices);
+
+ // Gets list of touchscreen input devices.
+ GetTouchscreenDevices() => (array<InputDevice> devices);
+
+ // Gets list of mouse input devices.
+ GetMouseDevices() => (array<InputDevice> devices);
+
+ // Gets list of touchpad input devices.
+ GetTouchpadDevices() => (array<InputDevice> devices);
+};

Powered by Google App Engine
This is Rietveld 408576698