Chromium Code Reviews| Index: Source/modules/background_sync/SyncManager.h |
| diff --git a/Source/modules/push_messaging/PushManager.h b/Source/modules/background_sync/SyncManager.h |
| similarity index 33% |
| copy from Source/modules/push_messaging/PushManager.h |
| copy to Source/modules/background_sync/SyncManager.h |
| index 0bcd2ef4dd8d1228484a103be0b5ca45cab7e6cb..71c6d0a7e2702c80a574d21f1c0912c090e56465 100644 |
| --- a/Source/modules/push_messaging/PushManager.h |
| +++ b/Source/modules/background_sync/SyncManager.h |
| @@ -1,39 +1,48 @@ |
| -// 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 PushManager_h |
| -#define PushManager_h |
| +#ifndef SyncManager_h |
| +#define SyncManager_h |
| #include "bindings/core/v8/ScriptWrappable.h" |
| #include "platform/heap/Handle.h" |
| namespace blink { |
| +class SyncRegistrationOptions; |
| +class ExecutionContext; |
| class ScriptPromise; |
| +class ScriptPromiseResolver; |
| class ScriptState; |
| class ServiceWorkerRegistration; |
| -class PushManager final : public GarbageCollected<PushManager>, public ScriptWrappable { |
| +class SyncManager final |
| + : public GarbageCollectedFinalized<SyncManager> |
| + , public ScriptWrappable { |
| DEFINE_WRAPPERTYPEINFO(); |
| public: |
| - static PushManager* create(ServiceWorkerRegistration* registration) |
| + static SyncManager* create(ServiceWorkerRegistration* registration) |
| { |
| - return new PushManager(registration); |
| + return new SyncManager(registration); |
| } |
| + ~SyncManager() { } |
| - ScriptPromise subscribe(ScriptState*); |
| - ScriptPromise getSubscription(ScriptState*); |
| - ScriptPromise hasPermission(ScriptState*); |
| + unsigned long minAllowablePeriod(); |
| - DECLARE_TRACE(); |
| + ScriptPromise registerFunction(ScriptState*); |
| + ScriptPromise registerFunction(ScriptState*, const SyncRegistrationOptions&); |
| + ScriptPromise getRegistrations(ScriptState*); |
| + |
| + void trace(Visitor*); |
|
jkarlin
2015/02/27 20:08:13
DECLARE_TRACE();
iclelland
2015/03/02 03:51:12
Done.
|
| private: |
| - explicit PushManager(ServiceWorkerRegistration*); |
| + explicit SyncManager(ServiceWorkerRegistration* registration) : m_registration(registration) { } |
|
jkarlin
2015/02/27 20:08:13
Define this in the CPP file and ASSERT(registratio
iclelland
2015/03/02 03:51:12
Done.
|
| + unsigned long m_minAllowablePeriod; |
|
jkarlin
2015/02/27 20:08:13
Remove this and use a constant
iclelland
2015/03/02 03:51:11
Done.
|
| Member<ServiceWorkerRegistration> m_registration; |
| }; |
| } // namespace blink |
| -#endif // PushManager_h |
| +#endif // SyncManager_h |