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

Unified Diff: third_party/WebKit/Source/modules/device_orientation/DeviceMotionEvent.cpp

Issue 2720943002: Implement DeviceMotionEvent constructor. (Closed)
Patch Set: Reference Candidate Recommendation. 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/device_orientation/DeviceMotionEvent.cpp
diff --git a/third_party/WebKit/Source/modules/device_orientation/DeviceMotionEvent.cpp b/third_party/WebKit/Source/modules/device_orientation/DeviceMotionEvent.cpp
index 0985837e85a4f5b7c79aa017ab30f84598edb054..0a5c88efd5d007c64c249851883b00621d5479f1 100644
--- a/third_party/WebKit/Source/modules/device_orientation/DeviceMotionEvent.cpp
+++ b/third_party/WebKit/Source/modules/device_orientation/DeviceMotionEvent.cpp
@@ -27,6 +27,7 @@
#include "modules/device_orientation/DeviceAcceleration.h"
#include "modules/device_orientation/DeviceMotionData.h"
+#include "modules/device_orientation/DeviceMotionEventInit.h"
#include "modules/device_orientation/DeviceRotationRate.h"
namespace blink {
@@ -37,6 +38,11 @@ DeviceMotionEvent::DeviceMotionEvent()
: m_deviceMotionData(DeviceMotionData::create()) {}
DeviceMotionEvent::DeviceMotionEvent(const AtomicString& eventType,
+ const DeviceMotionEventInit& initializer)
+ : Event(eventType, initializer),
+ m_deviceMotionData(DeviceMotionData::create(initializer)) {}
+
+DeviceMotionEvent::DeviceMotionEvent(const AtomicString& eventType,
DeviceMotionData* deviceMotionData)
: Event(eventType, false, false), // Can't bubble, not cancelable
m_deviceMotionData(deviceMotionData) {}

Powered by Google App Engine
This is Rietveld 408576698