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

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

Issue 2684743003: [Sensors] start() and stop() methods do not throw (Closed)
Patch Set: Created 3 years, 10 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 | « no previous file | third_party/WebKit/Source/modules/sensor/Sensor.cpp » ('j') | 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 #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/ContextLifecycleObserver.h" 10 #include "core/dom/ContextLifecycleObserver.h"
(...skipping 17 matching lines...) Expand all
28 public ContextLifecycleObserver, 28 public ContextLifecycleObserver,
29 public SensorProxy::Observer { 29 public SensorProxy::Observer {
30 USING_GARBAGE_COLLECTED_MIXIN(Sensor); 30 USING_GARBAGE_COLLECTED_MIXIN(Sensor);
31 DEFINE_WRAPPERTYPEINFO(); 31 DEFINE_WRAPPERTYPEINFO();
32 32
33 public: 33 public:
34 enum class SensorState { Unconnected, Activating, Activated, Idle, Errored }; 34 enum class SensorState { Unconnected, Activating, Activated, Idle, Errored };
35 35
36 ~Sensor() override; 36 ~Sensor() override;
37 37
38 void start(ScriptState*, ExceptionState&); 38 void start();
39 void stop(ScriptState*, ExceptionState&); 39 void stop();
40 40
41 // EventTarget overrides. 41 // EventTarget overrides.
42 const AtomicString& interfaceName() const override { 42 const AtomicString& interfaceName() const override {
43 return EventTargetNames::Sensor; 43 return EventTargetNames::Sensor;
44 } 44 }
45 ExecutionContext* getExecutionContext() const override { 45 ExecutionContext* getExecutionContext() const override {
46 return ContextLifecycleObserver::getExecutionContext(); 46 return ContextLifecycleObserver::getExecutionContext();
47 } 47 }
48 48
49 // Getters 49 // Getters
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 SensorState m_state; 110 SensorState m_state;
111 Member<SensorProxy> m_sensorProxy; 111 Member<SensorProxy> m_sensorProxy;
112 device::SensorReading m_storedData; 112 device::SensorReading m_storedData;
113 SensorConfigurationPtr m_configuration; 113 SensorConfigurationPtr m_configuration;
114 double m_lastUpdateTimestamp; 114 double m_lastUpdateTimestamp;
115 }; 115 };
116 116
117 } // namespace blink 117 } // namespace blink
118 118
119 #endif // Sensor_h 119 #endif // Sensor_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/sensor/Sensor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698