| Index: third_party/WebKit/Source/modules/sensor/AmbientLightSensor.h
|
| diff --git a/third_party/WebKit/Source/modules/sensor/AmbientLightSensor.h b/third_party/WebKit/Source/modules/sensor/AmbientLightSensor.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..df2de29dd3f7dffd9bdf69514f45aa4ba3b8a3f5
|
| --- /dev/null
|
| +++ b/third_party/WebKit/Source/modules/sensor/AmbientLightSensor.h
|
| @@ -0,0 +1,56 @@
|
| +// Copyright 2016 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.
|
| +
|
| +#ifndef AmbientLightSensor_h
|
| +#define AmbientLightSensor_h
|
| +
|
| +#include "bindings/core/v8/ScriptPromise.h"
|
| +#include "bindings/core/v8/ScriptPromiseProperty.h"
|
| +#include "bindings/core/v8/ScriptWrappable.h"
|
| +#include "core/dom/ActiveDOMObject.h"
|
| +#include "modules/EventTargetModules.h"
|
| +#include "modules/ModulesExport.h"
|
| +#include "modules/sensor/AmbientLightSensorReading.h"
|
| +#include "modules/sensor/Sensor.h"
|
| +#include "modules/sensor/SensorOptions.h"
|
| +#include "modules/sensor/SensorState.h"
|
| +#include "modules/sensor/als_reading.h"
|
| +#include "platform/heap/Handle.h"
|
| +#include "wtf/text/WTFString.h"
|
| +
|
| +namespace blink {
|
| +
|
| +class ExceptionState;
|
| +class ScriptState;
|
| +
|
| +class AmbientLightSensor
|
| + : public Sensor {
|
| + USING_GARBAGE_COLLECTED_MIXIN(AmbientLightSensor);
|
| + DEFINE_WRAPPERTYPEINFO();
|
| +
|
| +public:
|
| + static AmbientLightSensor* create(ExecutionContext*, SensorOptions, ExceptionState&);
|
| + static AmbientLightSensor* create(ExecutionContext*, ExceptionState&);
|
| +
|
| + ~AmbientLightSensor() override;
|
| +
|
| + // Getters
|
| + AmbientLightSensorReading& reading();
|
| +
|
| + // Inherited from PlatformEventController.
|
| + void didUpdateData() override;
|
| + void registerWithDispatcher() override;
|
| + void unregisterWithDispatcher() override;
|
| + bool hasLastData() override;
|
| +
|
| + DECLARE_VIRTUAL_TRACE();
|
| +
|
| +private:
|
| + AmbientLightSensor(ExecutionContext*, SensorOptions);
|
| + Member<AmbientLightSensorReading> m_lightReading;
|
| +};
|
| +
|
| +} // namespace blink
|
| +
|
| +#endif // AmbientLightSensor_h
|
|
|