OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef BackgroundFetchManager_h |
| 6 #define BackgroundFetchManager_h |
| 7 |
| 8 #include "bindings/core/v8/ScriptPromise.h" |
| 9 #include "bindings/core/v8/ScriptWrappable.h" |
| 10 #include "platform/Supplementable.h" |
| 11 #include "wtf/text/WTFString.h" |
| 12 |
| 13 namespace blink { |
| 14 |
| 15 class ScriptState; |
| 16 class ServiceWorkerRegistration; |
| 17 |
| 18 class BackgroundFetchManager final |
| 19 : public GarbageCollectedFinalized<BackgroundFetchManager>, |
| 20 public ScriptWrappable { |
| 21 DEFINE_WRAPPERTYPEINFO(); |
| 22 |
| 23 public: |
| 24 static BackgroundFetchManager* create( |
| 25 ServiceWorkerRegistration* registration) { |
| 26 return new BackgroundFetchManager(registration); |
| 27 } |
| 28 |
| 29 // Implementation of the Background Fetch API interface. |
| 30 |
| 31 // TODO(awdf) Should have fetch and get methods. |
| 32 |
| 33 // TODO(awdf) getTags promise should contain multiple tags. |
| 34 ScriptPromise getTags(ScriptState*); |
| 35 |
| 36 DECLARE_TRACE(); |
| 37 |
| 38 private: |
| 39 explicit BackgroundFetchManager(ServiceWorkerRegistration*); |
| 40 |
| 41 Member<ServiceWorkerRegistration> m_registration; |
| 42 String m_tag; |
| 43 }; |
| 44 |
| 45 } // namespace blink |
| 46 |
| 47 #endif // BackgroundFetchManager_h |
OLD | NEW |