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

Side by Side Diff: third_party/WebKit/Source/modules/sensor/Sensor.h

Issue 2465363004: [Sensors] Consider maximum supported frequency (Closed)
Patch Set: Created 4 years, 1 month 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
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 #ifndef Sensor_h 5 #ifndef Sensor_h
6 #define Sensor_h 6 #define Sensor_h
7 7
8 #include "bindings/core/v8/ActiveScriptWrappable.h" 8 #include "bindings/core/v8/ActiveScriptWrappable.h"
9 #include "bindings/core/v8/ScriptWrappable.h" 9 #include "bindings/core/v8/ScriptWrappable.h"
10 #include "core/dom/ActiveDOMObject.h" 10 #include "core/dom/ActiveDOMObject.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 Sensor(ScriptState*, 65 Sensor(ScriptState*,
66 const SensorOptions&, 66 const SensorOptions&,
67 ExceptionState&, 67 ExceptionState&,
68 device::mojom::blink::SensorType); 68 device::mojom::blink::SensorType);
69 virtual SensorReading* createSensorReading(SensorProxy*) = 0; 69 virtual SensorReading* createSensorReading(SensorProxy*) = 0;
70 70
71 using SensorConfigurationPtr = device::mojom::blink::SensorConfigurationPtr; 71 using SensorConfigurationPtr = device::mojom::blink::SensorConfigurationPtr;
72 using SensorConfiguration = device::mojom::blink::SensorConfiguration; 72 using SensorConfiguration = device::mojom::blink::SensorConfiguration;
73 virtual SensorConfigurationPtr createSensorConfig( 73 virtual SensorConfigurationPtr createSensorConfig(
74 const SensorOptions&, 74 const SensorOptions&,
75 const SensorConfiguration& defaultConfiguration) = 0; 75 const SensorConfiguration& defaultConfiguration,
76 double maxSupportedFrequency) = 0;
76 77
77 private: 78 private:
78 void initSensorProxyIfNeeded(); 79 void initSensorProxyIfNeeded();
79 80
80 // ContextLifecycleObserver overrides. 81 // ContextLifecycleObserver overrides.
81 void contextDestroyed() override; 82 void contextDestroyed() override;
82 83
83 // SensorController::Observer overrides. 84 // SensorController::Observer overrides.
84 void onSensorInitialized() override; 85 void onSensorInitialized() override;
85 void onSensorReadingChanged() override; 86 void onSensorReadingChanged() override;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 SensorState m_state; 118 SensorState m_state;
118 Member<SensorProxy> m_sensorProxy; 119 Member<SensorProxy> m_sensorProxy;
119 std::unique_ptr<SensorPollingStrategy> m_polling; 120 std::unique_ptr<SensorPollingStrategy> m_polling;
120 SensorProxy::Reading m_storedData; 121 SensorProxy::Reading m_storedData;
121 SensorConfigurationPtr m_configuration; 122 SensorConfigurationPtr m_configuration;
122 }; 123 };
123 124
124 } // namespace blink 125 } // namespace blink
125 126
126 #endif // Sensor_h 127 #endif // Sensor_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698