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

Unified Diff: third_party/WebKit/public/web/WebDataSource.h

Issue 2733283004: Expose WebServiceWorkerNetworkProvider on DataSource (Closed)
Patch Set: consistency 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/public/web/WebDataSource.h
diff --git a/third_party/WebKit/public/web/WebDataSource.h b/third_party/WebKit/public/web/WebDataSource.h
index c2b118ac412d890aa7cae91a3567237a17774b19..a084487335ca8ac0d6d4cbb665b4799caf892db2 100644
--- a/third_party/WebKit/public/web/WebDataSource.h
+++ b/third_party/WebKit/public/web/WebDataSource.h
@@ -31,6 +31,8 @@
#ifndef WebDataSource_h
#define WebDataSource_h
+#include <memory>
+
#include "../platform/WebCommon.h"
#include "WebNavigationType.h"
#include "WebTextDirection.h"
@@ -38,6 +40,7 @@
namespace blink {
class WebDocumentSubresourceFilter;
+class WebServiceWorkerNetworkProvider;
class WebURL;
class WebURLRequest;
class WebURLResponse;
@@ -120,6 +123,14 @@ class WebDataSource {
// datasource is destroyed or when a new filter is set.
virtual void setSubresourceFilter(WebDocumentSubresourceFilter*) = 0;
+ // Allows the embedder to set and return the service worker provider
+ // associated with the data source. The provider may provide the service
+ // worker that controls the resource loading from this data source.
+ virtual void setServiceWorkerNetworkProvider(
+ std::unique_ptr<WebServiceWorkerNetworkProvider>) = 0;
+ virtual WebServiceWorkerNetworkProvider*
+ getServiceWorkerNetworkProvider() = 0;
+
protected:
~WebDataSource() {}
};

Powered by Google App Engine
This is Rietveld 408576698