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

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

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/SyncError.cpp ('k') | Source/modules/background_sync/SyncEvent.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/background_sync/SyncEvent.h
diff --git a/Source/modules/push_messaging/PushEvent.h b/Source/modules/background_sync/SyncEvent.h
similarity index 32%
copy from Source/modules/push_messaging/PushEvent.h
copy to Source/modules/background_sync/SyncEvent.h
index 22659883d751be3898c9a1f6b0e720e04edc24fd..b45b0185813c69482769517367cd5fcb874f436e 100644
--- a/Source/modules/push_messaging/PushEvent.h
+++ b/Source/modules/background_sync/SyncEvent.h
@@ -1,13 +1,13 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
+// 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.
-#ifndef PushEvent_h
-#define PushEvent_h
+#ifndef SyncEvent_h
+#define SyncEvent_h
#include "modules/EventModules.h"
-#include "modules/push_messaging/PushEventInit.h"
-#include "modules/push_messaging/PushMessageData.h"
+#include "modules/background_sync/SyncEventInit.h"
+#include "modules/background_sync/SyncRegistration.h"
#include "modules/serviceworkers/ExtendableEvent.h"
#include "platform/heap/Handle.h"
#include "wtf/text/AtomicString.h"
@@ -15,38 +15,38 @@
namespace blink {
-class PushEvent final : public ExtendableEvent {
+class SyncEvent final : public ExtendableEvent {
DEFINE_WRAPPERTYPEINFO();
public:
- static PassRefPtrWillBeRawPtr<PushEvent> create()
+ static PassRefPtrWillBeRawPtr<SyncEvent> create()
{
- return adoptRefWillBeNoop(new PushEvent);
+ return adoptRefWillBeNoop(new SyncEvent);
}
- static PassRefPtrWillBeRawPtr<PushEvent> create(const AtomicString& type, PushMessageData* data, WaitUntilObserver* observer)
+ static PassRefPtrWillBeRawPtr<SyncEvent> create(const AtomicString& type, SyncRegistration* syncRegistration, WaitUntilObserver* observer)
{
- return adoptRefWillBeNoop(new PushEvent(type, data, observer));
+ return adoptRefWillBeNoop(new SyncEvent(type, syncRegistration, observer));
}
- static PassRefPtrWillBeRawPtr<PushEvent> create(const AtomicString& type, const PushEventInit& initializer)
+ static PassRefPtrWillBeRawPtr<SyncEvent> create(const AtomicString& type, const SyncEventInit& init)
{
- return adoptRefWillBeNoop(new PushEvent(type, initializer));
+ return adoptRefWillBeNoop(new SyncEvent(type, init));
}
- virtual ~PushEvent();
+ virtual ~SyncEvent();
virtual const AtomicString& interfaceName() const override;
- PushMessageData* data();
+ SyncRegistration* registration();
DECLARE_VIRTUAL_TRACE();
private:
- PushEvent();
- PushEvent(const AtomicString& type, PushMessageData*, WaitUntilObserver*);
- PushEvent(const AtomicString& type, const PushEventInit&);
+ SyncEvent();
+ SyncEvent(const AtomicString& type, SyncRegistration*, WaitUntilObserver*);
+ SyncEvent(const AtomicString& type, const SyncEventInit&);
- PersistentWillBeMember<PushMessageData> m_data;
+ PersistentWillBeMember<SyncRegistration> m_syncRegistration;
};
} // namespace blink
-#endif // PushEvent_h
+#endif // SyncEvent_h
« no previous file with comments | « Source/modules/background_sync/SyncError.cpp ('k') | Source/modules/background_sync/SyncEvent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698