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

Unified Diff: Source/modules/push_messaging/PushEvent.cpp

Issue 285403002: Push API: define push event on Service Worker. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Define PushEvent with data attribute. Created 6 years, 7 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: Source/modules/push_messaging/PushEvent.cpp
diff --git a/Source/modules/push_messaging/PushEvent.cpp b/Source/modules/push_messaging/PushEvent.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..be4b8ae0ffdaa34f9e713f21d468e98c9efa0ec4
--- /dev/null
+++ b/Source/modules/push_messaging/PushEvent.cpp
@@ -0,0 +1,42 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "config.h"
+#include "modules/push_messaging/PushEvent.h"
+
+namespace WebCore {
+
+PushEventInit::PushEventInit()
+{
+}
+
+PushEvent::PushEvent()
+{
+ ScriptWrappable::init(this);
+}
+
+PushEvent::PushEvent(const AtomicString& type, const String& data)
+ : Event(type, true, true)
Peter Beverloo 2014/05/16 15:41:43 Could you change this to be somewhat more readable
Michael van Ouwerkerk 2014/05/21 17:06:42 You're right, these should probably not bubble or
+ , m_data(data)
+{
+ ScriptWrappable::init(this);
+}
+
+PushEvent::PushEvent(const AtomicString& type, const PushEventInit& initializer)
+ : Event(type, initializer)
+ , m_data(initializer.data)
+{
+ ScriptWrappable::init(this);
+}
+
+PushEvent::~PushEvent()
+{
+}
+
+const AtomicString& PushEvent::interfaceName() const
+{
+ return EventNames::PushEvent;
+}
+
+} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698