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

Unified Diff: third_party/WebKit/Source/modules/sensor/AmbientLightSensor.cpp

Issue 2353493002: [Sensors] Allow Sensor API only on secure top-level browsing contexts and add frequency checks (Closed)
Patch Set: Comments from Tim Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/sensor/AmbientLightSensor.cpp
diff --git a/third_party/WebKit/Source/modules/sensor/AmbientLightSensor.cpp b/third_party/WebKit/Source/modules/sensor/AmbientLightSensor.cpp
index aaede9f5011bdb801b1e32c4918817810245c91f..fbc298b816e2752d18eee324bab3e5fb15a8a0e5 100644
--- a/third_party/WebKit/Source/modules/sensor/AmbientLightSensor.cpp
+++ b/third_party/WebKit/Source/modules/sensor/AmbientLightSensor.cpp
@@ -13,19 +13,19 @@ using device::mojom::blink::SensorType;
namespace blink {
// static
-AmbientLightSensor* AmbientLightSensor::create(ExecutionContext* context, const SensorOptions& sensorOptions)
+AmbientLightSensor* AmbientLightSensor::create(ScriptState* scriptState, const SensorOptions& options, ExceptionState& exceptionState)
{
- return new AmbientLightSensor(context, sensorOptions);
+ return new AmbientLightSensor(scriptState, options, exceptionState);
}
// static
-AmbientLightSensor* AmbientLightSensor::create(ExecutionContext* context)
+AmbientLightSensor* AmbientLightSensor::create(ScriptState* scriptState, ExceptionState& exceptionState)
{
- return create(context, SensorOptions());
+ return create(scriptState, SensorOptions(), exceptionState);
}
-AmbientLightSensor::AmbientLightSensor(ExecutionContext* executionContext, const SensorOptions& sensorOptions)
- : Sensor(executionContext, sensorOptions, SensorType::AMBIENT_LIGHT)
+AmbientLightSensor::AmbientLightSensor(ScriptState* scriptState, const SensorOptions& options, ExceptionState& exceptionState)
+ : Sensor(scriptState, options, exceptionState, SensorType::AMBIENT_LIGHT)
{
}

Powered by Google App Engine
This is Rietveld 408576698