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

Side by Side Diff: third_party/WebKit/Source/modules/background_sync/SyncEvent.h

Issue 1437883002: [Background Sync] Align exposed API with spec (Closed) Base URL: https://chromium.googlesource.com/chromium/src@remove-periodic
Patch Set: Rebase Created 5 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef SyncEvent_h 5 #ifndef SyncEvent_h
6 #define SyncEvent_h 6 #define SyncEvent_h
7 7
8 #include "modules/EventModules.h" 8 #include "modules/EventModules.h"
9 #include "modules/background_sync/SyncEventInit.h" 9 #include "modules/background_sync/SyncEventInit.h"
10 #include "modules/background_sync/SyncRegistration.h" 10 #include "modules/background_sync/SyncRegistration.h"
11 #include "modules/serviceworkers/ExtendableEvent.h" 11 #include "modules/serviceworkers/ExtendableEvent.h"
12 #include "platform/heap/Handle.h" 12 #include "platform/heap/Handle.h"
13 #include "wtf/text/AtomicString.h" 13 #include "wtf/text/AtomicString.h"
14 #include "wtf/text/WTFString.h" 14 #include "wtf/text/WTFString.h"
15 15
16 namespace blink { 16 namespace blink {
17 17
18 class MODULES_EXPORT SyncEvent final : public ExtendableEvent { 18 class MODULES_EXPORT SyncEvent final : public ExtendableEvent {
19 DEFINE_WRAPPERTYPEINFO(); 19 DEFINE_WRAPPERTYPEINFO();
20 public: 20 public:
21 static PassRefPtrWillBeRawPtr<SyncEvent> create() 21 static PassRefPtrWillBeRawPtr<SyncEvent> create()
22 { 22 {
23 return adoptRefWillBeNoop(new SyncEvent); 23 return adoptRefWillBeNoop(new SyncEvent);
24 } 24 }
25 static PassRefPtrWillBeRawPtr<SyncEvent> create(const AtomicString& type, Sy ncRegistration* syncRegistration, bool lastChance, WaitUntilObserver* observer) 25 static PassRefPtrWillBeRawPtr<SyncEvent> create(const AtomicString& type, co nst String& tag, bool lastChance, WaitUntilObserver* observer)
26 { 26 {
27 return adoptRefWillBeNoop(new SyncEvent(type, syncRegistration, lastChan ce, observer)); 27 return adoptRefWillBeNoop(new SyncEvent(type, tag, lastChance, observer) );
28 } 28 }
29 static PassRefPtrWillBeRawPtr<SyncEvent> create(const AtomicString& type, co nst SyncEventInit& init) 29 static PassRefPtrWillBeRawPtr<SyncEvent> create(const AtomicString& type, co nst SyncEventInit& init)
30 { 30 {
31 return adoptRefWillBeNoop(new SyncEvent(type, init)); 31 return adoptRefWillBeNoop(new SyncEvent(type, init));
32 } 32 }
33 33
34 ~SyncEvent() override; 34 ~SyncEvent() override;
35 35
36 const AtomicString& interfaceName() const override; 36 const AtomicString& interfaceName() const override;
37 37
38 SyncRegistration* registration(); 38 String tag();
39 bool lastChance(); 39 bool lastChance();
40 40
41 DECLARE_VIRTUAL_TRACE(); 41 DECLARE_VIRTUAL_TRACE();
42 42
43 private: 43 private:
44 SyncEvent(); 44 SyncEvent();
45 SyncEvent(const AtomicString& type, SyncRegistration*, bool, WaitUntilObserv er*); 45 SyncEvent(const AtomicString& type, const String&, bool, WaitUntilObserver*) ;
46 SyncEvent(const AtomicString& type, const SyncEventInit&); 46 SyncEvent(const AtomicString& type, const SyncEventInit&);
47 47
48 PersistentWillBeMember<SyncRegistration> m_syncRegistration; 48 String m_tag;
49 bool m_lastChance; 49 bool m_lastChance;
50 }; 50 };
51 51
52 } // namespace blink 52 } // namespace blink
53 53
54 #endif // SyncEvent_h 54 #endif // SyncEvent_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698