| OLD | NEW |
| 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 #ifndef SensorProxy_h | 5 #ifndef SensorProxy_h |
| 6 #define SensorProxy_h | 6 #define SensorProxy_h |
| 7 | 7 |
| 8 #include "core/dom/ExceptionCode.h" | 8 #include "core/dom/ExceptionCode.h" |
| 9 #include "core/page/PageVisibilityObserver.h" | 9 #include "core/page/PageVisibilityObserver.h" |
| 10 #include "device/generic_sensor/public/cpp/sensor_reading.h" | |
| 11 #include "device/generic_sensor/public/interfaces/sensor.mojom-blink.h" | |
| 12 #include "device/generic_sensor/public/interfaces/sensor_provider.mojom-blink.h" | |
| 13 #include "mojo/public/cpp/bindings/binding.h" | 10 #include "mojo/public/cpp/bindings/binding.h" |
| 14 #include "platform/Supplementable.h" | 11 #include "platform/Supplementable.h" |
| 15 #include "platform/Timer.h" | 12 #include "platform/Timer.h" |
| 16 #include "platform/heap/Handle.h" | 13 #include "platform/heap/Handle.h" |
| 17 #include "platform/wtf/Vector.h" | 14 #include "platform/wtf/Vector.h" |
| 15 #include "services/device/public/cpp/generic_sensor/sensor_reading.h" |
| 16 #include "services/device/public/interfaces/sensor.mojom-blink.h" |
| 17 #include "services/device/public/interfaces/sensor_provider.mojom-blink.h" |
| 18 | 18 |
| 19 namespace blink { | 19 namespace blink { |
| 20 | 20 |
| 21 class SensorProviderProxy; | 21 class SensorProviderProxy; |
| 22 class SensorReading; | 22 class SensorReading; |
| 23 | 23 |
| 24 // This class wraps 'Sensor' mojo interface and used by multiple | 24 // This class wraps 'Sensor' mojo interface and used by multiple |
| 25 // JS sensor instances of the same type (within a single frame). | 25 // JS sensor instances of the same type (within a single frame). |
| 26 class SensorProxy final : public GarbageCollectedFinalized<SensorProxy>, | 26 class SensorProxy final : public GarbageCollectedFinalized<SensorProxy>, |
| 27 public device::mojom::blink::SensorClient, | 27 public device::mojom::blink::SensorClient, |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 using ReadingBuffer = device::SensorReadingSharedBuffer; | 138 using ReadingBuffer = device::SensorReadingSharedBuffer; |
| 139 static_assert( | 139 static_assert( |
| 140 sizeof(ReadingBuffer) == | 140 sizeof(ReadingBuffer) == |
| 141 device::mojom::blink::SensorInitParams::kReadBufferSizeForTests, | 141 device::mojom::blink::SensorInitParams::kReadBufferSizeForTests, |
| 142 "Check reading buffer size for tests"); | 142 "Check reading buffer size for tests"); |
| 143 }; | 143 }; |
| 144 | 144 |
| 145 } // namespace blink | 145 } // namespace blink |
| 146 | 146 |
| 147 #endif // SensorProxy_h | 147 #endif // SensorProxy_h |
| OLD | NEW |