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

Side by Side Diff: third_party/WebKit/Source/modules/background_fetch/ServiceWorkerRegistrationBackgroundFetch.h

Issue 2739653002: Beginnings of BackgroundFetch idl implementation
Patch Set: 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 unified diff | Download patch
OLDNEW
(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 ServiceWorkerRegistrationBackgroundFetch_h
6 #define ServiceWorkerRegistrationBackgroundFetch_h
7
8 #include "modules/serviceworkers/ServiceWorkerRegistration.h"
9 #include "platform/Supplementable.h"
10
11 namespace blink {
12
13 class BackgroundFetchManager;
14 class ServiceWorkerRegistration;
15
16 // This exposes the background fetch manager on the ServiceWorkerRegistration
17 // partial interface.
18 class ServiceWorkerRegistrationBackgroundFetch final
19 : public GarbageCollectedFinalized<
20 ServiceWorkerRegistrationBackgroundFetch>,
21 public Supplement<ServiceWorkerRegistration> {
22 USING_GARBAGE_COLLECTED_MIXIN(ServiceWorkerRegistrationBackgroundFetch);
23 WTF_MAKE_NONCOPYABLE(ServiceWorkerRegistrationBackgroundFetch);
24
25 public:
26 virtual ~ServiceWorkerRegistrationBackgroundFetch();
27 static ServiceWorkerRegistrationBackgroundFetch& from(
28 ServiceWorkerRegistration&);
29
30 // Implementation of the Background Fetch API interface.
31 static BackgroundFetchManager* backgroundFetch(ServiceWorkerRegistration&);
32 BackgroundFetchManager* backgroundFetch();
33
34 DECLARE_VIRTUAL_TRACE();
35
36 private:
37 explicit ServiceWorkerRegistrationBackgroundFetch(ServiceWorkerRegistration*);
38 static const char* supplementName();
39
40 Member<ServiceWorkerRegistration> m_registration;
41 Member<BackgroundFetchManager> m_backgroundFetch;
42 };
43
44 } // namespace blink
45
46 #endif // ServiceWorkerRegistrationBackgroundFetch_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698