Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(656)

Unified Diff: third_party/WebKit/Source/modules/background_fetch/BackgroundFetchManager.h

Issue 2736143003: Introduce the Background Fetch module. (Closed)
Patch Set: more webexposed tests Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..67d18198a0b02d4b373a60c410eb68a1c0a777f3
--- /dev/null
+++ b/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchManager.h
@@ -0,0 +1,43 @@
+// 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/ScriptPromise.h"
+#include "bindings/core/v8/ScriptWrappable.h"
+#include "platform/heap/GarbageCollected.h"
+#include "platform/heap/Handle.h"
+
+namespace blink {
+
+class ScriptState;
+class ServiceWorkerRegistration;
+
+// Implementation of the BackgroundFetchManager JavaScript object, accessible
+// by developers through ServiceWorkerRegistration.backgroundFetch.
+class BackgroundFetchManager final
+ : public GarbageCollected<BackgroundFetchManager>,
+ public ScriptWrappable {
+ DEFINE_WRAPPERTYPEINFO();
+
+ public:
+ static BackgroundFetchManager* create(
+ ServiceWorkerRegistration* registration) {
+ return new BackgroundFetchManager(registration);
+ }
+
+ ScriptPromise getTags(ScriptState*);
+
+ DECLARE_TRACE();
+
+ private:
+ explicit BackgroundFetchManager(ServiceWorkerRegistration*);
+
+ Member<ServiceWorkerRegistration> m_registration;
+};
+
+} // namespace blink
+
+#endif // BackgroundFetchManager_h

Powered by Google App Engine
This is Rietveld 408576698