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 #include "public/platform/WebURL.h" | |
9 | |
8 namespace base { | 10 namespace base { |
9 class SingleThreadTaskRunner; | 11 class SingleThreadTaskRunner; |
10 } // namespace base | 12 } // namespace base |
11 | 13 |
12 namespace blink { | 14 namespace blink { |
13 | 15 |
14 class WebURLLoader; | 16 class WebURLLoader; |
15 class WebURLRequest; | 17 class WebURLRequest; |
16 | 18 |
17 // WebWorkerFetchContext is a per-worker object created on the main thread, | 19 // WebWorkerFetchContext is a per-worker object created on the main thread, |
(...skipping 15 matching lines...) Expand all Loading... | |
33 // handle the request correctly in the loading stack later. (Example: service | 35 // handle the request correctly in the loading stack later. (Example: service |
34 // worker) | 36 // worker) |
35 virtual void WillSendRequest(WebURLRequest&) = 0; | 37 virtual void WillSendRequest(WebURLRequest&) = 0; |
36 | 38 |
37 // Whether the fetch context is controlled by a service worker. | 39 // Whether the fetch context is controlled by a service worker. |
38 virtual bool IsControlledByServiceWorker() const = 0; | 40 virtual bool IsControlledByServiceWorker() const = 0; |
39 | 41 |
40 // The flag for Data Saver. | 42 // The flag for Data Saver. |
41 virtual void SetDataSaverEnabled(bool) = 0; | 43 virtual void SetDataSaverEnabled(bool) = 0; |
42 virtual bool IsDataSaverEnabled() const = 0; | 44 virtual bool IsDataSaverEnabled() const = 0; |
45 | |
46 // Used to implement third-party cookie blocking. | |
falken
2017/05/17 08:55:31
URLRequest has good docu for this: can we keep som
horo
2017/05/17 09:44:03
Done.
| |
47 virtual WebURL FirstPartyForCookies() const = 0; | |
43 }; | 48 }; |
44 | 49 |
45 } // namespace blink | 50 } // namespace blink |
46 | 51 |
47 #endif // WebWorkerFetchContext_h | 52 #endif // WebWorkerFetchContext_h |
OLD | NEW |