Chromium Code Reviews| 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 33% |
| copy from Source/modules/push_messaging/PushEvent.h |
| copy to Source/modules/background_sync/SyncEvent.h |
| index 22659883d751be3898c9a1f6b0e720e04edc24fd..c1a0c879a88831e03c04336b5941309757d168b2 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* registration, WaitUntilObserver* observer) |
|
Michael van Ouwerkerk
2015/03/02 14:19:11
nit: since related code also deals with ServiceWor
iclelland
2015/03/05 04:32:48
Done.
|
| { |
| - return adoptRefWillBeNoop(new PushEvent(type, data, observer)); |
| + return adoptRefWillBeNoop(new SyncEvent(type, registration, 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_registration; |
| }; |
| } // namespace blink |
| -#endif // PushEvent_h |
| +#endif // SyncEvent_h |