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 31% |
| copy from Source/modules/push_messaging/PushEvent.h |
| copy to Source/modules/background_sync/SyncEvent.h |
| index 22659883d751be3898c9a1f6b0e720e04edc24fd..57aa75429935b436e28a0be5ccd722d599c58d1e 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) |
| { |
| - 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(); |
| + virtual void trace(Visitor*) override; |
|
jkarlin
2015/02/27 20:08:12
DECLARE_VIRTUAL_TRACE();
iclelland
2015/03/02 03:51:11
Done.
|
| 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 |