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

Side by Side Diff: content/child/request_extra_data.h

Issue 2345253002: Remove content::RequestInfo (Closed)
Patch Set: Rebase Created 4 years, 3 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
« no previous file with comments | « content/child/BUILD.gn ('k') | content/child/request_extra_data.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_CHILD_REQUEST_EXTRA_DATA_H_ 5 #ifndef CONTENT_CHILD_REQUEST_EXTRA_DATA_H_
6 #define CONTENT_CHILD_REQUEST_EXTRA_DATA_H_ 6 #define CONTENT_CHILD_REQUEST_EXTRA_DATA_H_
7 7
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "content/child/web_url_loader_impl.h" 12 #include "content/child/web_url_loader_impl.h"
13 #include "content/common/content_export.h" 13 #include "content/common/content_export.h"
14 #include "content/common/navigation_params.h" 14 #include "content/common/navigation_params.h"
15 #include "third_party/WebKit/public/platform/WebPageVisibilityState.h" 15 #include "third_party/WebKit/public/platform/WebPageVisibilityState.h"
16 #include "third_party/WebKit/public/platform/WebString.h" 16 #include "third_party/WebKit/public/platform/WebString.h"
17 #include "third_party/WebKit/public/platform/WebURLRequest.h" 17 #include "third_party/WebKit/public/platform/WebURLRequest.h"
18 #include "ui/base/page_transition_types.h" 18 #include "ui/base/page_transition_types.h"
19 19
20 namespace content { 20 namespace content {
21 21
22 struct ResourceRequest;
23
22 // Can be used by callers to store extra data on every ResourceRequest 24 // Can be used by callers to store extra data on every ResourceRequest
23 // which will be incorporated into the ResourceHostMsg_RequestResource message 25 // which will be incorporated into the ResourceHostMsg_RequestResource message
24 // sent by ResourceDispatcher. 26 // sent by ResourceDispatcher.
25 class CONTENT_EXPORT RequestExtraData 27 class CONTENT_EXPORT RequestExtraData
26 : public NON_EXPORTED_BASE(blink::WebURLRequest::ExtraData) { 28 : public NON_EXPORTED_BASE(blink::WebURLRequest::ExtraData) {
27 public: 29 public:
28 RequestExtraData(); 30 RequestExtraData();
29 ~RequestExtraData() override; 31 ~RequestExtraData() override;
30 32
31 blink::WebPageVisibilityState visibility_state() const { 33 blink::WebPageVisibilityState visibility_state() const {
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 141
140 // The request is downloaded to the network cache, but not rendered or 142 // The request is downloaded to the network cache, but not rendered or
141 // executed. The renderer will see this as an aborted request. 143 // executed. The renderer will see this as an aborted request.
142 bool download_to_network_cache_only() const { 144 bool download_to_network_cache_only() const {
143 return download_to_network_cache_only_; 145 return download_to_network_cache_only_;
144 } 146 }
145 void set_download_to_network_cache_only(bool download_to_cache) { 147 void set_download_to_network_cache_only(bool download_to_cache) {
146 download_to_network_cache_only_ = download_to_cache; 148 download_to_network_cache_only_ = download_to_cache;
147 } 149 }
148 150
151 void CopyToResourceRequest(ResourceRequest* request) const;
152
149 private: 153 private:
150 blink::WebPageVisibilityState visibility_state_; 154 blink::WebPageVisibilityState visibility_state_;
151 int render_frame_id_; 155 int render_frame_id_;
152 bool is_main_frame_; 156 bool is_main_frame_;
153 GURL frame_origin_; 157 GURL frame_origin_;
154 bool parent_is_main_frame_; 158 bool parent_is_main_frame_;
155 int parent_render_frame_id_; 159 int parent_render_frame_id_;
156 bool allow_download_; 160 bool allow_download_;
157 ui::PageTransition transition_type_; 161 ui::PageTransition transition_type_;
158 bool should_replace_current_entry_; 162 bool should_replace_current_entry_;
159 int transferred_request_child_id_; 163 int transferred_request_child_id_;
160 int transferred_request_request_id_; 164 int transferred_request_request_id_;
161 int service_worker_provider_id_; 165 int service_worker_provider_id_;
162 bool originated_from_service_worker_; 166 bool originated_from_service_worker_;
163 blink::WebString custom_user_agent_; 167 blink::WebString custom_user_agent_;
164 blink::WebString requested_with_; 168 blink::WebString requested_with_;
165 std::unique_ptr<StreamOverrideParameters> stream_override_; 169 std::unique_ptr<StreamOverrideParameters> stream_override_;
166 bool initiated_in_secure_context_; 170 bool initiated_in_secure_context_;
167 bool is_prefetch_; 171 bool is_prefetch_;
168 bool download_to_network_cache_only_; 172 bool download_to_network_cache_only_;
169 173
170 DISALLOW_COPY_AND_ASSIGN(RequestExtraData); 174 DISALLOW_COPY_AND_ASSIGN(RequestExtraData);
171 }; 175 };
172 176
173 } // namespace content 177 } // namespace content
174 178
175 #endif // CONTENT_CHILD_REQUEST_EXTRA_DATA_H_ 179 #endif // CONTENT_CHILD_REQUEST_EXTRA_DATA_H_
OLDNEW
« no previous file with comments | « content/child/BUILD.gn ('k') | content/child/request_extra_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698