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

Side by Side Diff: device/generic_sensor/public/interfaces/sensor_provider.mojom

Issue 2726093003: [sensors][android] Add support for AbsoluteOrientation sensor (Closed)
Patch Set: Rebased to master, rename enum Created 3 years, 9 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 unified diff | Download patch
« no previous file with comments | « device/generic_sensor/public/interfaces/sensor.mojom ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 module device.mojom; 5 module device.mojom;
6 6
7 import "sensor.mojom"; 7 import "sensor.mojom";
8 8
9 struct SensorInitParams { 9 struct SensorInitParams {
10 // The shared memory handle used to fetch the sensor reading. 10 // The shared memory handle used to fetch the sensor reading.
11 handle<shared_buffer> memory; 11 handle<shared_buffer> memory;
12 12
13 // The offset at which shared buffer must be mapped. 13 // The offset at which shared buffer must be mapped.
14 uint64 buffer_offset; 14 uint64 buffer_offset;
15 15
16 // The ReportingMode supported by the sensor. 16 // The ReportingMode supported by the sensor.
17 ReportingMode mode; 17 ReportingMode mode;
18 18
19 // Default sensor configuration. 19 // Default sensor configuration.
20 SensorConfiguration default_configuration; 20 SensorConfiguration default_configuration;
21 21
22 // Maximum sampling frequency for the sensor: it considers both 22 // Maximum sampling frequency for the sensor: it considers both
23 // |SensorConfiguration::kMaxAllowedFrequency| and actual sensor 23 // |SensorConfiguration::kMaxAllowedFrequency| and actual sensor
24 // capabilities. 24 // capabilities.
25 double maximum_frequency; 25 double maximum_frequency;
26 26
27 // Minimum sampling frequency for the sensor. 27 // Minimum sampling frequency for the sensor.
28 double minimum_frequency; 28 double minimum_frequency;
29 29
30 // Each sensor's read buffer contains 4 tightly packed 64-bit floating 30 // Each sensor's read buffer contains 5 tightly packed 64-bit floating
31 // point fields (please see sensor_reading.h) and a seqlock, so its size is 31 // point fields (please see sensor_reading.h) and a seqlock, so its size is
32 // 5 * 8 = 40 bytes. 32 // 6 * 8 = 48 bytes.
33 const uint64 kReadBufferSizeForTests = 40; 33 const uint64 kReadBufferSizeForTests = 48;
34 }; 34 };
35 35
36 interface SensorProvider { 36 interface SensorProvider {
37 // Gets the sensor interface by the given type. 37 // Gets the sensor interface by the given type.
38 // 38 //
39 // |type| type of the sensor. 39 // |type| type of the sensor.
40 // 40 //
41 // |sensor_request| the Sensor interface instance to be initialized. 41 // |sensor_request| the Sensor interface instance to be initialized.
42 // 42 //
43 // |init_params| on success will contain the SensorInitParams describing the 43 // |init_params| on success will contain the SensorInitParams describing the
44 // sensor details, 44 // sensor details,
45 // contains null on failure. 45 // contains null on failure.
46 // |client_request| on success contains a request to be bound by the client, 46 // |client_request| on success contains a request to be bound by the client,
47 // contains null on failure. 47 // contains null on failure.
48 GetSensor(SensorType type, Sensor& sensor_request) => ( 48 GetSensor(SensorType type, Sensor& sensor_request) => (
49 SensorInitParams? init_params, 49 SensorInitParams? init_params,
50 SensorClient&? client_request); 50 SensorClient&? client_request);
51 }; 51 };
OLDNEW
« no previous file with comments | « device/generic_sensor/public/interfaces/sensor.mojom ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698