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

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

Issue 1096503002: [Background Sync] Converting Blink code to the MVP API (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Unregister method requires the sync registration tag Created 5 years, 8 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/background_sync/PeriodicSyncEvent.cpp
diff --git a/Source/modules/background_sync/PeriodicSyncEvent.cpp b/Source/modules/background_sync/PeriodicSyncEvent.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..dc3587e4d47dcc715a01710c0b38db2e2717eff7
--- /dev/null
+++ b/Source/modules/background_sync/PeriodicSyncEvent.cpp
@@ -0,0 +1,49 @@
+// 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/PeriodicSyncEvent.h"
+
+#include "modules/background_sync/PeriodicSyncEventInit.h"
+#include "modules/background_sync/PeriodicSyncRegistration.h"
+
+namespace blink {
+
+PeriodicSyncEvent::PeriodicSyncEvent()
+{
+}
+
+PeriodicSyncEvent::PeriodicSyncEvent(const AtomicString& type, PeriodicSyncRegistration* periodicRegistration, WaitUntilObserver* observer)
+ : ExtendableEvent(type, ExtendableEventInit(), observer)
+ , m_periodicRegistration(periodicRegistration)
+{
+}
+
+PeriodicSyncEvent::PeriodicSyncEvent(const AtomicString& type, const PeriodicSyncEventInit& init)
+ : ExtendableEvent(type, init)
+{
+ m_periodicRegistration = init.registration();
+}
+
+PeriodicSyncEvent::~PeriodicSyncEvent()
+{
+}
+
+const AtomicString& PeriodicSyncEvent::interfaceName() const
+{
+ return EventNames::PeriodicSyncEvent;
+}
+
+PeriodicSyncRegistration* PeriodicSyncEvent::registration()
+{
+ return m_periodicRegistration.get();
+}
+
+DEFINE_TRACE(PeriodicSyncEvent)
+{
+ visitor->trace(m_periodicRegistration);
+ ExtendableEvent::trace(visitor);
+}
+
+} // namespace blink
« no previous file with comments | « Source/modules/background_sync/PeriodicSyncEvent.h ('k') | Source/modules/background_sync/PeriodicSyncEvent.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698