Index: third_party/WebKit/Source/modules/background_fetch/BackgroundFetchManager.h |
diff --git a/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchManager.h b/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchManager.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..daff0c8a7ecc70761ea58ed5b5936fd6ab6aa084 |
--- /dev/null |
+++ b/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchManager.h |
@@ -0,0 +1,42 @@ |
+// Copyright 2017 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 BackgroundFetchManager_h |
+#define BackgroundFetchManager_h |
+ |
+#include "bindings/core/v8/ScriptWrappable.h" |
+#include "platform/Supplementable.h" |
+#include "wtf/text/WTFString.h" |
+ |
+namespace blink { |
+ |
+class ServiceWorkerRegistration; |
+ |
+class BackgroundFetchManager final |
+ : public GarbageCollectedFinalized<BackgroundFetchManager>, |
+ public ScriptWrappable { |
+ DEFINE_WRAPPERTYPEINFO(); |
+ |
+ public: |
+ static BackgroundFetchManager* create( |
+ ServiceWorkerRegistration* registration) { |
+ return new BackgroundFetchManager(registration); |
+ } |
+ |
+ // Implementation of the Background Fetch API interface. |
+ // TODO(awdf) Should have fetch, get and getTags methods, not tag field. |
+ const String& tag() const { return m_tag; } |
+ |
+ DECLARE_TRACE(); |
+ |
+ private: |
+ explicit BackgroundFetchManager(ServiceWorkerRegistration*); |
+ |
+ Member<ServiceWorkerRegistration> m_registration; |
+ String m_tag; |
+}; |
+ |
+} // namespace blink |
+ |
+#endif // BackgroundFetchManager_h |