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

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

Issue 2720003003: Implement DeviceOrientationEvent 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/DeviceOrientationEvent.cpp
diff --git a/third_party/WebKit/Source/modules/device_orientation/DeviceOrientationEvent.cpp b/third_party/WebKit/Source/modules/device_orientation/DeviceOrientationEvent.cpp
index 9ae63337d513be898f64c813a254f2cc46c21c54..f5edc72757459bd3ae6760c18e54359020e61228 100644
--- a/third_party/WebKit/Source/modules/device_orientation/DeviceOrientationEvent.cpp
+++ b/third_party/WebKit/Source/modules/device_orientation/DeviceOrientationEvent.cpp
@@ -26,6 +26,7 @@
#include "modules/device_orientation/DeviceOrientationEvent.h"
#include "modules/device_orientation/DeviceOrientationData.h"
+#include "modules/device_orientation/DeviceOrientationEventInit.h"
namespace blink {
@@ -36,6 +37,12 @@ DeviceOrientationEvent::DeviceOrientationEvent()
DeviceOrientationEvent::DeviceOrientationEvent(
const AtomicString& eventType,
+ const DeviceOrientationEventInit& initializer)
+ : Event(eventType, initializer),
+ m_orientation(DeviceOrientationData::create(initializer)) {}
+
+DeviceOrientationEvent::DeviceOrientationEvent(
+ const AtomicString& eventType,
DeviceOrientationData* orientation)
: Event(eventType, false, false), // Can't bubble, not cancelable
m_orientation(orientation) {}

Powered by Google App Engine
This is Rietveld 408576698