| 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 SyncManager_h | 5 #ifndef SyncManager_h |
| 6 #define SyncManager_h | 6 #define SyncManager_h |
| 7 | 7 |
| 8 #include "bindings/core/v8/ScriptWrappable.h" | 8 #include "bindings/core/v8/ScriptWrappable.h" |
| 9 #include "platform/heap/Handle.h" | 9 #include "platform/heap/Handle.h" |
| 10 #include "wtf/text/WTFString.h" | 10 #include "wtf/text/WTFString.h" |
| 11 | 11 |
| 12 namespace blink { | 12 namespace blink { |
| 13 | 13 |
| 14 class ExecutionContext; | 14 class ExecutionContext; |
| 15 class SyncRegistrationOptions; | 15 class SyncRegistrationOptions; |
| 16 class ScriptPromise; | 16 class ScriptPromise; |
| 17 class ScriptState; | 17 class ScriptState; |
| 18 class ServiceWorkerRegistration; | 18 class ServiceWorkerRegistration; |
| 19 | 19 |
| 20 class SyncManager final : public GarbageCollected<SyncManager> , public ScriptWr
appable { | 20 class SyncManager final : public GarbageCollected<SyncManager> , public ScriptWr
appable { |
| 21 DEFINE_WRAPPERTYPEINFO(); | 21 DEFINE_WRAPPERTYPEINFO(); |
| 22 public: | 22 public: |
| 23 static SyncManager* create(ServiceWorkerRegistration* registration) | 23 static SyncManager* create(ServiceWorkerRegistration* registration) |
| 24 { | 24 { |
| 25 return new SyncManager(registration); | 25 return new SyncManager(registration); |
| 26 } | 26 } |
| 27 | 27 |
| 28 unsigned long minAllowablePeriod(); | |
| 29 | |
| 30 ScriptPromise registerFunction(ScriptState*, ExecutionContext*, const String
&); | 28 ScriptPromise registerFunction(ScriptState*, ExecutionContext*, const String
&); |
| 31 ScriptPromise getTags(ScriptState*); | 29 ScriptPromise getTags(ScriptState*); |
| 32 | 30 |
| 33 DECLARE_TRACE(); | 31 DECLARE_TRACE(); |
| 34 | 32 |
| 35 private: | 33 private: |
| 36 explicit SyncManager(ServiceWorkerRegistration*); | 34 explicit SyncManager(ServiceWorkerRegistration*); |
| 37 | 35 |
| 38 Member<ServiceWorkerRegistration> m_registration; | 36 Member<ServiceWorkerRegistration> m_registration; |
| 39 }; | 37 }; |
| 40 | 38 |
| 41 } // namespace blink | 39 } // namespace blink |
| 42 | 40 |
| 43 #endif // SyncManager_h | 41 #endif // SyncManager_h |
| OLD | NEW |