OLD | NEW |
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 PeriodicSyncRegistration_h | 5 #ifndef PeriodicSyncRegistration_h |
6 #define PeriodicSyncRegistration_h | 6 #define PeriodicSyncRegistration_h |
7 | 7 |
8 #include "bindings/core/v8/ScriptPromise.h" | 8 #include "bindings/core/v8/ScriptPromise.h" |
9 #include "bindings/core/v8/ScriptWrappable.h" | 9 #include "bindings/core/v8/ScriptWrappable.h" |
10 #include "modules/background_sync/PeriodicSyncRegistrationOptions.h" | 10 #include "modules/background_sync/PeriodicSyncRegistrationOptions.h" |
11 #include "wtf/text/WTFString.h" | 11 #include "wtf/text/WTFString.h" |
12 | 12 |
13 namespace blink { | 13 namespace blink { |
14 | 14 |
15 class ServiceWorkerRegistration; | 15 class ServiceWorkerRegistration; |
16 class ScriptPromiseResolver; | 16 class ScriptPromiseResolver; |
17 class ScriptState; | 17 class ScriptState; |
18 struct WebSyncRegistration; | 18 struct WebSyncRegistration; |
19 | 19 |
20 class PeriodicSyncRegistration final : public GarbageCollectedFinalized<Periodic
SyncRegistration>, public ScriptWrappable { | 20 class PeriodicSyncRegistration final : public GarbageCollectedFinalized<Periodic
SyncRegistration>, public ScriptWrappable { |
21 DEFINE_WRAPPERTYPEINFO(); | 21 DEFINE_WRAPPERTYPEINFO(); |
22 public: | 22 public: |
23 static PeriodicSyncRegistration* take(ScriptPromiseResolver*, WebSyncRegistr
ation*, ServiceWorkerRegistration*); | 23 static PeriodicSyncRegistration* take(ScriptPromiseResolver*, PassOwnPtr<Web
SyncRegistration>, ServiceWorkerRegistration*); |
24 static void dispose(WebSyncRegistration* registrationRaw); | |
25 | 24 |
26 virtual ~PeriodicSyncRegistration(); | 25 virtual ~PeriodicSyncRegistration(); |
27 | 26 |
28 unsigned long minPeriod() const { return m_minPeriod; } | 27 unsigned long minPeriod() const { return m_minPeriod; } |
29 void setMinPeriod(unsigned long value) { m_minPeriod = value; } | 28 void setMinPeriod(unsigned long value) { m_minPeriod = value; } |
30 | 29 |
31 String networkState() const { return m_networkState; } | 30 String networkState() const { return m_networkState; } |
32 void setNetworkState(String value) { m_networkState = value; } | 31 void setNetworkState(String value) { m_networkState = value; } |
33 | 32 |
34 String powerState() const { return m_powerState; } | 33 String powerState() const { return m_powerState; } |
(...skipping 14 matching lines...) Expand all Loading... |
49 String m_networkState; | 48 String m_networkState; |
50 String m_powerState; | 49 String m_powerState; |
51 String m_tag; | 50 String m_tag; |
52 | 51 |
53 Member<ServiceWorkerRegistration> m_serviceWorkerRegistration; | 52 Member<ServiceWorkerRegistration> m_serviceWorkerRegistration; |
54 }; | 53 }; |
55 | 54 |
56 } // namespace blink | 55 } // namespace blink |
57 | 56 |
58 #endif // PeriodicSyncRegistration_h | 57 #endif // PeriodicSyncRegistration_h |
OLD | NEW |