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_BROWSER_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_ |
6 #define CONTENT_BROWSER_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_ | 6 #define CONTENT_BROWSER_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 bool has_user_gesture, | 65 bool has_user_gesture, |
66 bool enable_load_timing, | 66 bool enable_load_timing, |
67 bool enable_upload_progress, | 67 bool enable_upload_progress, |
68 bool do_not_prompt_for_login, | 68 bool do_not_prompt_for_login, |
69 blink::WebReferrerPolicy referrer_policy, | 69 blink::WebReferrerPolicy referrer_policy, |
70 blink::WebPageVisibilityState visibility_state, | 70 blink::WebPageVisibilityState visibility_state, |
71 ResourceContext* context, | 71 ResourceContext* context, |
72 bool report_raw_headers, | 72 bool report_raw_headers, |
73 bool is_async, | 73 bool is_async, |
74 PreviewsState previews_state, | 74 PreviewsState previews_state, |
75 const std::string& original_headers, | |
76 const scoped_refptr<ResourceRequestBodyImpl> body, | 75 const scoped_refptr<ResourceRequestBodyImpl> body, |
77 bool initiated_in_secure_context); | 76 bool initiated_in_secure_context); |
78 ~ResourceRequestInfoImpl() override; | 77 ~ResourceRequestInfoImpl() override; |
79 | 78 |
80 // ResourceRequestInfo implementation: | 79 // ResourceRequestInfo implementation: |
81 WebContentsGetter GetWebContentsGetterForRequest() const override; | 80 WebContentsGetter GetWebContentsGetterForRequest() const override; |
82 ResourceContext* GetContext() const override; | 81 ResourceContext* GetContext() const override; |
83 int GetChildID() const override; | 82 int GetChildID() const override; |
84 int GetRouteID() const override; | 83 int GetRouteID() const override; |
85 GlobalRequestID GetGlobalRequestID() const override; | 84 GlobalRequestID GetGlobalRequestID() const override; |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 void set_memory_cost(int cost) { memory_cost_ = cost; } | 172 void set_memory_cost(int cost) { memory_cost_ = cost; } |
174 | 173 |
175 bool is_load_timing_enabled() const { return enable_load_timing_; } | 174 bool is_load_timing_enabled() const { return enable_load_timing_; } |
176 | 175 |
177 bool is_upload_progress_enabled() const { return enable_upload_progress_; } | 176 bool is_upload_progress_enabled() const { return enable_upload_progress_; } |
178 | 177 |
179 bool do_not_prompt_for_login() const { return do_not_prompt_for_login_; } | 178 bool do_not_prompt_for_login() const { return do_not_prompt_for_login_; } |
180 void set_do_not_prompt_for_login(bool do_not_prompt) { | 179 void set_do_not_prompt_for_login(bool do_not_prompt) { |
181 do_not_prompt_for_login_ = do_not_prompt; | 180 do_not_prompt_for_login_ = do_not_prompt; |
182 } | 181 } |
183 const std::string& original_headers() const { return original_headers_; } | |
184 | 182 |
185 const scoped_refptr<ResourceRequestBodyImpl>& body() const { return body_; } | 183 const scoped_refptr<ResourceRequestBodyImpl>& body() const { return body_; } |
186 void ResetBody(); | 184 void ResetBody(); |
187 | 185 |
188 bool initiated_in_secure_context() const { | 186 bool initiated_in_secure_context() const { |
189 return initiated_in_secure_context_; | 187 return initiated_in_secure_context_; |
190 } | 188 } |
191 void set_initiated_in_secure_context_for_testing(bool secure) { | 189 void set_initiated_in_secure_context_for_testing(bool secure) { |
192 initiated_in_secure_context_ = secure; | 190 initiated_in_secure_context_ = secure; |
193 } | 191 } |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 bool counted_as_in_flight_request_; | 227 bool counted_as_in_flight_request_; |
230 ResourceType resource_type_; | 228 ResourceType resource_type_; |
231 ui::PageTransition transition_type_; | 229 ui::PageTransition transition_type_; |
232 int memory_cost_; | 230 int memory_cost_; |
233 blink::WebReferrerPolicy referrer_policy_; | 231 blink::WebReferrerPolicy referrer_policy_; |
234 blink::WebPageVisibilityState visibility_state_; | 232 blink::WebPageVisibilityState visibility_state_; |
235 ResourceContext* context_; | 233 ResourceContext* context_; |
236 bool report_raw_headers_; | 234 bool report_raw_headers_; |
237 bool is_async_; | 235 bool is_async_; |
238 PreviewsState previews_state_; | 236 PreviewsState previews_state_; |
239 const std::string original_headers_; | |
240 scoped_refptr<ResourceRequestBodyImpl> body_; | 237 scoped_refptr<ResourceRequestBodyImpl> body_; |
241 bool initiated_in_secure_context_; | 238 bool initiated_in_secure_context_; |
242 std::unique_ptr<NavigationUIData> navigation_ui_data_; | 239 std::unique_ptr<NavigationUIData> navigation_ui_data_; |
243 | 240 |
244 // This callback is set by MojoAsyncResourceHandler to update its mojo binding | 241 // This callback is set by MojoAsyncResourceHandler to update its mojo binding |
245 // and remote endpoint. This callback will be removed once PlzNavigate is | 242 // and remote endpoint. This callback will be removed once PlzNavigate is |
246 // shipped. | 243 // shipped. |
247 TransferCallback on_transfer_; | 244 TransferCallback on_transfer_; |
248 | 245 |
249 DISALLOW_COPY_AND_ASSIGN(ResourceRequestInfoImpl); | 246 DISALLOW_COPY_AND_ASSIGN(ResourceRequestInfoImpl); |
250 }; | 247 }; |
251 | 248 |
252 } // namespace content | 249 } // namespace content |
253 | 250 |
254 #endif // CONTENT_BROWSER_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_ | 251 #endif // CONTENT_BROWSER_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_ |
OLD | NEW |