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

Unified Diff: Source/modules/background_sync/SyncEvent.cpp

Issue 963683002: Add IDL and initial Blink API for Background Sync (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add missing serviceWorkerRegistration.syncManager to interface tests Created 5 years, 9 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
« no previous file with comments | « Source/modules/background_sync/SyncEvent.h ('k') | Source/modules/background_sync/SyncEvent.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/background_sync/SyncEvent.cpp
diff --git a/Source/modules/background_sync/SyncEvent.cpp b/Source/modules/background_sync/SyncEvent.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..a3dbf8681303934487fbd344750e306d1e05f3bf
--- /dev/null
+++ b/Source/modules/background_sync/SyncEvent.cpp
@@ -0,0 +1,46 @@
+// Copyright 2015 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/background_sync/SyncEvent.h"
+
+namespace blink {
+
+SyncEvent::SyncEvent()
+{
+}
+
+SyncEvent::SyncEvent(const AtomicString& type, SyncRegistration* syncRegistration, WaitUntilObserver* observer)
+ : ExtendableEvent(type, ExtendableEventInit(), observer)
+ , m_syncRegistration(syncRegistration)
+{
+}
+
+SyncEvent::SyncEvent(const AtomicString& type, const SyncEventInit& init)
+ : ExtendableEvent(type, init)
+{
+ m_syncRegistration = init.registration();
+}
+
+SyncEvent::~SyncEvent()
+{
+}
+
+const AtomicString& SyncEvent::interfaceName() const
+{
+ return EventNames::SyncEvent;
+}
+
+SyncRegistration* SyncEvent::registration()
+{
+ return m_syncRegistration.get();
+}
+
+DEFINE_TRACE(SyncEvent)
+{
+ visitor->trace(m_syncRegistration);
+ ExtendableEvent::trace(visitor);
+}
+
+} // namespace blink
« no previous file with comments | « Source/modules/background_sync/SyncEvent.h ('k') | Source/modules/background_sync/SyncEvent.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698