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

Side by Side Diff: third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerRegistration.h

Issue 2433273003: service worker: Plumb NavigationPreloadManager.enable/disable to browser-side (Closed)
Patch Set: comments Created 4 years, 1 month 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
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef WebServiceWorkerRegistration_h 5 #ifndef WebServiceWorkerRegistration_h
6 #define WebServiceWorkerRegistration_h 6 #define WebServiceWorkerRegistration_h
7 7
8 #include "public/platform/WebCallbacks.h" 8 #include "public/platform/WebCallbacks.h"
9 #include "public/platform/WebURL.h" 9 #include "public/platform/WebURL.h"
10 #include "public/platform/modules/serviceworker/WebServiceWorkerError.h" 10 #include "public/platform/modules/serviceworker/WebServiceWorkerError.h"
(...skipping 10 matching lines...) Expand all
21 class WebServiceWorkerRegistration { 21 class WebServiceWorkerRegistration {
22 public: 22 public:
23 virtual ~WebServiceWorkerRegistration() {} 23 virtual ~WebServiceWorkerRegistration() {}
24 24
25 using WebServiceWorkerUpdateCallbacks = 25 using WebServiceWorkerUpdateCallbacks =
26 WebCallbacks<void, const WebServiceWorkerError&>; 26 WebCallbacks<void, const WebServiceWorkerError&>;
27 using WebServiceWorkerUnregistrationCallbacks = 27 using WebServiceWorkerUnregistrationCallbacks =
28 WebCallbacks<bool, const WebServiceWorkerError&>; 28 WebCallbacks<bool, const WebServiceWorkerError&>;
29 using WebEnableNavigationPreloadCallbacks = 29 using WebEnableNavigationPreloadCallbacks =
30 WebCallbacks<void, const WebServiceWorkerError&>; 30 WebCallbacks<void, const WebServiceWorkerError&>;
31 using WebDisableNavigationPreloadCallbacks =
32 WebCallbacks<void, const WebServiceWorkerError&>;
33 31
34 // The handle interface that retains a reference to the implementation of 32 // The handle interface that retains a reference to the implementation of
35 // WebServiceWorkerRegistration in the embedder and is owned by 33 // WebServiceWorkerRegistration in the embedder and is owned by
36 // ServiceWorkerRegistration object in Blink. The embedder must keep the 34 // ServiceWorkerRegistration object in Blink. The embedder must keep the
37 // registration representation while Blink is owning this handle. 35 // registration representation while Blink is owning this handle.
38 class Handle { 36 class Handle {
39 public: 37 public:
40 virtual ~Handle() {} 38 virtual ~Handle() {}
41 virtual WebServiceWorkerRegistration* registration() { return nullptr; } 39 virtual WebServiceWorkerRegistration* registration() { return nullptr; }
42 }; 40 };
43 41
44 virtual void setProxy(WebServiceWorkerRegistrationProxy*) {} 42 virtual void setProxy(WebServiceWorkerRegistrationProxy*) {}
45 virtual WebServiceWorkerRegistrationProxy* proxy() { return nullptr; } 43 virtual WebServiceWorkerRegistrationProxy* proxy() { return nullptr; }
46 virtual void proxyStopped() {} 44 virtual void proxyStopped() {}
47 45
48 virtual WebURL scope() const { return WebURL(); } 46 virtual WebURL scope() const { return WebURL(); }
49 virtual void update(WebServiceWorkerProvider*, 47 virtual void update(WebServiceWorkerProvider*,
50 WebServiceWorkerUpdateCallbacks*) {} 48 WebServiceWorkerUpdateCallbacks*) {}
51 virtual void unregister(WebServiceWorkerProvider*, 49 virtual void unregister(WebServiceWorkerProvider*,
52 WebServiceWorkerUnregistrationCallbacks*) {} 50 WebServiceWorkerUnregistrationCallbacks*) {}
53 51
54 virtual void enableNavigationPreload(WebEnableNavigationPreloadCallbacks*) {} 52 virtual void enableNavigationPreload(
55 virtual void disableNavigationPreload(WebEnableNavigationPreloadCallbacks*) {} 53 bool enable,
54 WebServiceWorkerProvider*,
55 std::unique_ptr<WebEnableNavigationPreloadCallbacks>) {}
56 }; 56 };
57 57
58 } // namespace blink 58 } // namespace blink
59 59
60 #endif // WebServiceWorkerRegistration_h 60 #endif // WebServiceWorkerRegistration_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/serviceworkers/NavigationPreloadManager.cpp ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698