OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 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 | 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 WebWorkerFetchContext_h | 5 #ifndef WebWorkerFetchContext_h |
6 #define WebWorkerFetchContext_h | 6 #define WebWorkerFetchContext_h |
7 | 7 |
8 namespace base { | 8 namespace base { |
9 class SingleThreadTaskRunner; | 9 class SingleThreadTaskRunner; |
10 } // namespace base | 10 } // namespace base |
(...skipping 18 matching lines...) Expand all Loading... |
29 // thread. | 29 // thread. |
30 virtual std::unique_ptr<WebURLLoader> CreateURLLoader() = 0; | 30 virtual std::unique_ptr<WebURLLoader> CreateURLLoader() = 0; |
31 | 31 |
32 // Called when a request is about to be sent out to modify the request to | 32 // Called when a request is about to be sent out to modify the request to |
33 // handle the request correctly in the loading stack later. (Example: service | 33 // handle the request correctly in the loading stack later. (Example: service |
34 // worker) | 34 // worker) |
35 virtual void WillSendRequest(WebURLRequest&) = 0; | 35 virtual void WillSendRequest(WebURLRequest&) = 0; |
36 | 36 |
37 // Whether the fetch context is controlled by a service worker. | 37 // Whether the fetch context is controlled by a service worker. |
38 virtual bool IsControlledByServiceWorker() const = 0; | 38 virtual bool IsControlledByServiceWorker() const = 0; |
| 39 |
| 40 // The flag for Data Saver. |
| 41 virtual void SetDataSaverEnabled(bool) = 0; |
| 42 virtual bool IsDataSaverEnabled() const = 0; |
39 }; | 43 }; |
40 | 44 |
41 } // namespace blink | 45 } // namespace blink |
42 | 46 |
43 #endif // WebWorkerFetchContext_h | 47 #endif // WebWorkerFetchContext_h |
OLD | NEW |