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

Side by Side 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 13 matching lines...) Expand all
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #ifndef WebDataSource_h 31 #ifndef WebDataSource_h
32 #define WebDataSource_h 32 #define WebDataSource_h
33 33
34 #include <memory>
35
34 #include "../platform/WebCommon.h" 36 #include "../platform/WebCommon.h"
35 #include "WebNavigationType.h" 37 #include "WebNavigationType.h"
36 #include "WebTextDirection.h" 38 #include "WebTextDirection.h"
37 39
38 namespace blink { 40 namespace blink {
39 41
40 class WebDocumentSubresourceFilter; 42 class WebDocumentSubresourceFilter;
43 class WebServiceWorkerNetworkProvider;
41 class WebURL; 44 class WebURL;
42 class WebURLRequest; 45 class WebURLRequest;
43 class WebURLResponse; 46 class WebURLResponse;
44 template <typename T> 47 template <typename T>
45 class WebVector; 48 class WebVector;
46 49
47 class WebDataSource { 50 class WebDataSource {
48 public: 51 public:
49 class ExtraData { 52 class ExtraData {
50 public: 53 public:
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 double redirectEndTime, 116 double redirectEndTime,
114 double fetchStartTime, 117 double fetchStartTime,
115 bool hasRedirect) = 0; 118 bool hasRedirect) = 0;
116 119
117 // Allows the embedder to inject a filter that will be consulted for each 120 // Allows the embedder to inject a filter that will be consulted for each
118 // subsequent subresource load, and gets the final say in deciding whether 121 // subsequent subresource load, and gets the final say in deciding whether
119 // or not to allow the load. The passed-in filter object is deleted when the 122 // or not to allow the load. The passed-in filter object is deleted when the
120 // datasource is destroyed or when a new filter is set. 123 // datasource is destroyed or when a new filter is set.
121 virtual void setSubresourceFilter(WebDocumentSubresourceFilter*) = 0; 124 virtual void setSubresourceFilter(WebDocumentSubresourceFilter*) = 0;
122 125
126 // Allows the embedder to set and return the service worker provider
127 // associated with the data source. The provider may provide the service
128 // worker that controls the resource loading from this data source.
129 virtual void setServiceWorkerNetworkProvider(
130 std::unique_ptr<WebServiceWorkerNetworkProvider>) = 0;
131 virtual WebServiceWorkerNetworkProvider*
132 getServiceWorkerNetworkProvider() = 0;
133
123 protected: 134 protected:
124 ~WebDataSource() {} 135 ~WebDataSource() {}
125 }; 136 };
126 137
127 } // namespace blink 138 } // namespace blink
128 139
129 #endif 140 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698