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() {} |
}; |