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

Unified Diff: third_party/WebKit/Source/modules/sensor/SensorErrorEvent.h

Issue 2384273004: [Sensors] 'onerror' event implementation (Closed)
Patch Set: updated global-interface-listing-expected.txt Created 4 years, 2 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/sensor/SensorErrorEvent.h
diff --git a/third_party/WebKit/Source/modules/sensor/SensorErrorEvent.h b/third_party/WebKit/Source/modules/sensor/SensorErrorEvent.h
index 1f4518834829a17cc53cd7a48b47fe0c21c11215..b5adfa0821caeaa50b057b7a1994c911f0211ecb 100644
--- a/third_party/WebKit/Source/modules/sensor/SensorErrorEvent.h
+++ b/third_party/WebKit/Source/modules/sensor/SensorErrorEvent.h
@@ -5,7 +5,7 @@
#ifndef SensorErrorEvent_h
#define SensorErrorEvent_h
-#include "core/events/ErrorEvent.h"
+#include "core/dom/DOMException.h"
#include "modules/EventModules.h"
#include "modules/sensor/SensorErrorEventInit.h"
#include "platform/heap/Handle.h"
@@ -16,8 +16,9 @@ class SensorErrorEvent : public Event {
DEFINE_WRAPPERTYPEINFO();
public:
- static SensorErrorEvent* create(const AtomicString& eventType) {
- return new SensorErrorEvent(eventType);
+ static SensorErrorEvent* create(const AtomicString& eventType,
+ DOMException* error) {
+ return new SensorErrorEvent(eventType, error);
}
static SensorErrorEvent* create(const AtomicString& eventType,
@@ -31,9 +32,14 @@ class SensorErrorEvent : public Event {
const AtomicString& interfaceName() const override;
- explicit SensorErrorEvent(const AtomicString& eventType);
+ DOMException* error() { return m_error; }
+
+ private:
+ SensorErrorEvent(const AtomicString& eventType, DOMException* error);
SensorErrorEvent(const AtomicString& eventType,
const SensorErrorEventInit& initializer);
+
+ Member<DOMException> m_error;
};
DEFINE_TYPE_CASTS(SensorErrorEvent,
« no previous file with comments | « third_party/WebKit/Source/modules/sensor/Sensor.cpp ('k') | third_party/WebKit/Source/modules/sensor/SensorErrorEvent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698