| 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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 | 146 |
| 146 // Returns true if this is associated with an asynchronous request. | 147 // Returns true if this is associated with an asynchronous request. |
| 147 virtual bool IsAsync() const = 0; | 148 virtual bool IsAsync() const = 0; |
| 148 | 149 |
| 149 // Whether this is a download. | 150 // Whether this is a download. |
| 150 virtual bool IsDownload() const = 0; | 151 virtual bool IsDownload() const = 0; |
| 151 | 152 |
| 152 // Whether this request if using Lo-Fi mode. | 153 // Whether this request if using Lo-Fi mode. |
| 153 virtual bool IsUsingLoFi() const = 0; | 154 virtual bool IsUsingLoFi() const = 0; |
| 154 | 155 |
| 156 // PlzNavigate |
| 157 // Only used for main resources. Returns opaque data set by the embedder on |
| 158 // the UI thread at the beginning of navigation. |
| 159 virtual NavigationUIData* GetNavigationUIData() const = 0; |
| 160 |
| 155 protected: | 161 protected: |
| 156 virtual ~ResourceRequestInfo() {} | 162 virtual ~ResourceRequestInfo() {} |
| 157 }; | 163 }; |
| 158 | 164 |
| 159 } // namespace content | 165 } // namespace content |
| 160 | 166 |
| 161 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_REQUEST_INFO_H_ | 167 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_REQUEST_INFO_H_ |
| OLD | NEW |