Index: device/device_sensors/device_sensors.mojom |
diff --git a/device/device_sensors/device_sensors.mojom b/device/device_sensors/device_sensors.mojom |
new file mode 100644 |
index 0000000000000000000000000000000000000000..ec06fae9b43b9cb2517345ceb37a2da02d5579d5 |
--- /dev/null |
+++ b/device/device_sensors/device_sensors.mojom |
@@ -0,0 +1,36 @@ |
+// 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. |
+ |
+module device; |
+ |
+struct SharedMemory { |
+ // For Windows: base::SharedMemoryHandle is defined as HANDLE. |
+ uint64 mem_handle; |
+ // For Posix: base::SharedMemoryHandle is defined as base::FileDescriptor. |
+ int32 fd; |
+}; |
+ |
+interface DeviceSensorsMotion { |
+ // Request to start polling, overlapping calls will be ignored. |
+ // process_id is caller process id to be used by DeviceSensorsMotion |
+ // implementation to share memory handle for caller process. |
+ // shared_mem transmits the shared memory handle back. |
+ StartPolling(int32 process_id) => (SharedMemory shared_mem); |
+}; |
+ |
+interface DeviceSensorsLight { |
+ // Request to start polling, overlapping calls will be ignored. |
+ // process_id is caller process id to be used by DeviceSensorsLight |
+ // implementation to share memory handle for caller process. |
+ // shared_mem transmits the shared memory handle back. |
+ StartPolling(int32 process_id) => (SharedMemory shared_mem); |
+}; |
+ |
+interface DeviceSensorsOrientation { |
+ // Request to start polling, overlapping calls will be ignored. |
+ // process_id is caller process id to be used by DeviceSensorsOrientation |
+ // implementation to share memory handle for caller process. |
+ // shared_mem transmits the shared memory handle back. |
+ StartPolling(int32 process_id) => (SharedMemory shared_mem); |
+}; |