| 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);
|
| +};
|
|
|