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 36% |
| copy from Source/modules/push_messaging/PushManager.h |
| copy to Source/modules/background_sync/SyncManager.h |
| index 0bcd2ef4dd8d1228484a103be0b5ca45cab7e6cb..9c75b4cb363cf4d19c009aceb431cfff470e6b8c 100644 |
| --- a/Source/modules/push_messaging/PushManager.h |
| +++ b/Source/modules/background_sync/SyncManager.h |
| @@ -1,39 +1,47 @@ |
| -// 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; |
|
Michael van Ouwerkerk
2015/03/02 14:19:11
This is not used.
iclelland
2015/03/05 04:32:48
Removed.
Done.
|
| class ScriptPromise; |
| +class ScriptPromiseResolver; |
|
Michael van Ouwerkerk
2015/03/02 14:19:11
This is not used.
iclelland
2015/03/05 04:32:48
Removed.
Done.
|
| 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*); |
|
Michael van Ouwerkerk
2015/03/02 14:19:11
Use the macro.
iclelland
2015/03/05 04:32:49
Done.
|
| private: |
| - explicit PushManager(ServiceWorkerRegistration*); |
| + explicit SyncManager(ServiceWorkerRegistration*); |
| Member<ServiceWorkerRegistration> m_registration; |
| }; |
| } // namespace blink |
| -#endif // PushManager_h |
| +#endif // SyncManager_h |