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

Unified Diff: third_party/WebKit/Source/modules/background_fetch/ServiceWorkerRegistrationBackgroundFetch.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/ServiceWorkerRegistrationBackgroundFetch.h
diff --git a/third_party/WebKit/Source/modules/background_fetch/ServiceWorkerRegistrationBackgroundFetch.h b/third_party/WebKit/Source/modules/background_fetch/ServiceWorkerRegistrationBackgroundFetch.h
new file mode 100644
index 0000000000000000000000000000000000000000..98d7aeb557f8c277b6c559ac1d90cb1d16c89445
--- /dev/null
+++ b/third_party/WebKit/Source/modules/background_fetch/ServiceWorkerRegistrationBackgroundFetch.h
@@ -0,0 +1,45 @@
+// 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 ServiceWorkerRegistrationBackgroundFetch_h
+#define ServiceWorkerRegistrationBackgroundFetch_h
+
+#include "modules/serviceworkers/ServiceWorkerRegistration.h"
+#include "platform/Supplementable.h"
+#include "platform/heap/GarbageCollected.h"
+#include "platform/heap/Handle.h"
+
+namespace blink {
+
+class BackgroundFetchManager;
+
+class ServiceWorkerRegistrationBackgroundFetch final
+ : public GarbageCollectedFinalized<
+ ServiceWorkerRegistrationBackgroundFetch>,
+ public Supplement<ServiceWorkerRegistration> {
+ USING_GARBAGE_COLLECTED_MIXIN(ServiceWorkerRegistrationBackgroundFetch);
+ WTF_MAKE_NONCOPYABLE(ServiceWorkerRegistrationBackgroundFetch);
+
+ public:
+ virtual ~ServiceWorkerRegistrationBackgroundFetch();
+
+ static ServiceWorkerRegistrationBackgroundFetch& from(
+ ServiceWorkerRegistration&);
+
+ static BackgroundFetchManager* backgroundFetch(ServiceWorkerRegistration&);
+ BackgroundFetchManager* backgroundFetch();
+
+ DECLARE_VIRTUAL_TRACE();
+
+ private:
+ explicit ServiceWorkerRegistrationBackgroundFetch(ServiceWorkerRegistration*);
+ static const char* supplementName();
+
+ Member<ServiceWorkerRegistration> m_registration;
+ Member<BackgroundFetchManager> m_backgroundFetchManager;
+};
+
+} // namespace blink
+
+#endif // ServiceWorkerRegistrationBackgroundFetch_h

Powered by Google App Engine
This is Rietveld 408576698