OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_PUBLIC_BROWSER_RESOURCE_REQUEST_INFO_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_RESOURCE_REQUEST_INFO_H_ |
6 #define CONTENT_PUBLIC_BROWSER_RESOURCE_REQUEST_INFO_H_ | 6 #define CONTENT_PUBLIC_BROWSER_RESOURCE_REQUEST_INFO_H_ |
7 | 7 |
8 #include "base/callback_forward.h" | 8 #include "base/callback_forward.h" |
9 #include "content/common/content_export.h" | 9 #include "content/common/content_export.h" |
10 #include "content/public/common/resource_type.h" | 10 #include "content/public/common/resource_type.h" |
11 #include "third_party/WebKit/public/platform/WebPageVisibilityState.h" | 11 #include "third_party/WebKit/public/platform/WebPageVisibilityState.h" |
12 #include "third_party/WebKit/public/platform/WebReferrerPolicy.h" | 12 #include "third_party/WebKit/public/platform/WebReferrerPolicy.h" |
13 #include "ui/base/page_transition_types.h" | 13 #include "ui/base/page_transition_types.h" |
14 | 14 |
15 namespace net { | 15 namespace net { |
16 class URLRequest; | 16 class URLRequest; |
17 } | 17 } |
18 | 18 |
19 namespace content { | 19 namespace content { |
| 20 class NavigationUIData; |
20 class ResourceContext; | 21 class ResourceContext; |
21 class WebContents; | 22 class WebContents; |
22 | 23 |
23 // Each URLRequest allocated by the ResourceDispatcherHost has a | 24 // Each URLRequest allocated by the ResourceDispatcherHost has a |
24 // ResourceRequestInfo instance associated with it. | 25 // ResourceRequestInfo instance associated with it. |
25 class ResourceRequestInfo { | 26 class ResourceRequestInfo { |
26 public: | 27 public: |
27 // Returns the ResourceRequestInfo associated with the given URLRequest. | 28 // Returns the ResourceRequestInfo associated with the given URLRequest. |
28 CONTENT_EXPORT static const ResourceRequestInfo* ForRequest( | 29 CONTENT_EXPORT static const ResourceRequestInfo* ForRequest( |
29 const net::URLRequest* request); | 30 const net::URLRequest* request); |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 | 150 |
150 // Returns true if this is associated with an asynchronous request. | 151 // Returns true if this is associated with an asynchronous request. |
151 virtual bool IsAsync() const = 0; | 152 virtual bool IsAsync() const = 0; |
152 | 153 |
153 // Whether this is a download. | 154 // Whether this is a download. |
154 virtual bool IsDownload() const = 0; | 155 virtual bool IsDownload() const = 0; |
155 | 156 |
156 // Whether this request if using Lo-Fi mode. | 157 // Whether this request if using Lo-Fi mode. |
157 virtual bool IsUsingLoFi() const = 0; | 158 virtual bool IsUsingLoFi() const = 0; |
158 | 159 |
| 160 // PlzNavigate |
| 161 // Only used for navigations. Returns opaque data set by the embedder on the |
| 162 // UI thread at the beginning of navigation. |
| 163 virtual NavigationUIData* GetNavigationUIData() const = 0; |
| 164 |
159 protected: | 165 protected: |
160 virtual ~ResourceRequestInfo() {} | 166 virtual ~ResourceRequestInfo() {} |
161 }; | 167 }; |
162 | 168 |
163 } // namespace content | 169 } // namespace content |
164 | 170 |
165 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_REQUEST_INFO_H_ | 171 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_REQUEST_INFO_H_ |
OLD | NEW |