| 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*);
|
|
|
| private:
|
| - explicit PushManager(ServiceWorkerRegistration*);
|
| + explicit SyncManager(ServiceWorkerRegistration* registration) : m_registration(registration) { }
|
|
|
| + unsigned long m_minAllowablePeriod;
|
| Member<ServiceWorkerRegistration> m_registration;
|
| };
|
|
|
| } // namespace blink
|
|
|
| -#endif // PushManager_h
|
| +#endif // SyncManager_h
|
|
|