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

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

Issue 2265873003: binding: Moves hasPendingActivity from ActiveScriptWrappable to ScriptWrappable. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed review comments. 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 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 SensorReading* reading() const; 47 SensorReading* reading() const;
48 48
49 DEFINE_ATTRIBUTE_EVENT_LISTENER(error); 49 DEFINE_ATTRIBUTE_EVENT_LISTENER(error);
50 DEFINE_ATTRIBUTE_EVENT_LISTENER(change); 50 DEFINE_ATTRIBUTE_EVENT_LISTENER(change);
51 DEFINE_ATTRIBUTE_EVENT_LISTENER(statechange); 51 DEFINE_ATTRIBUTE_EVENT_LISTENER(statechange);
52 52
53 // ActiveDOMObject implementation. 53 // ActiveDOMObject implementation.
54 void suspend() override; 54 void suspend() override;
55 void resume() override; 55 void resume() override;
56 void stop() override; 56 void stop() override;
57
58 // ScriptWrappable implementation.
57 bool hasPendingActivity() const override; 59 bool hasPendingActivity() const override;
58 60
59 DECLARE_VIRTUAL_TRACE(); 61 DECLARE_VIRTUAL_TRACE();
60 62
61 protected: 63 protected:
62 Sensor(ExecutionContext*, const SensorOptions&); 64 Sensor(ExecutionContext*, const SensorOptions&);
63 void notifyStateChange(); 65 void notifyStateChange();
64 66
65 SensorState m_sensorState; 67 SensorState m_sensorState;
66 Member<SensorReading> m_sensorReading; 68 Member<SensorReading> m_sensorReading;
67 SensorOptions m_sensorOptions; 69 SensorOptions m_sensorOptions;
68 }; 70 };
69 71
70 } // namespace blink 72 } // namespace blink
71 73
72 #endif // Sensor_h 74 #endif // Sensor_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698