OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_COMMON_NAVIGATION_PARAMS_H_ | 5 #ifndef CONTENT_COMMON_NAVIGATION_PARAMS_H_ |
6 #define CONTENT_COMMON_NAVIGATION_PARAMS_H_ | 6 #define CONTENT_COMMON_NAVIGATION_PARAMS_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
11 | 11 |
12 #include "base/memory/ref_counted.h" | |
12 #include "base/time/time.h" | 13 #include "base/time/time.h" |
13 #include "build/build_config.h" | 14 #include "build/build_config.h" |
14 #include "content/common/content_export.h" | 15 #include "content/common/content_export.h" |
15 #include "content/common/frame_message_enums.h" | 16 #include "content/common/frame_message_enums.h" |
17 #include "content/common/resource_request_body.h" | |
16 #include "content/public/common/page_state.h" | 18 #include "content/public/common/page_state.h" |
17 #include "content/public/common/referrer.h" | 19 #include "content/public/common/referrer.h" |
18 #include "content/public/common/request_context_type.h" | 20 #include "content/public/common/request_context_type.h" |
19 #include "ui/base/page_transition_types.h" | 21 #include "ui/base/page_transition_types.h" |
20 #include "url/gurl.h" | 22 #include "url/gurl.h" |
21 | 23 |
22 namespace content { | 24 namespace content { |
23 | 25 |
24 // The LoFi state which determines whether to add the Lo-Fi header. | 26 // The LoFi state which determines whether to add the Lo-Fi header. |
25 enum LoFiState { | 27 enum LoFiState { |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
165 // architecture should go in StartNavigationParams. | 167 // architecture should go in StartNavigationParams. |
166 | 168 |
167 // Used by FrameMsg_Navigate. Holds the parameters needed by the renderer to | 169 // Used by FrameMsg_Navigate. Holds the parameters needed by the renderer to |
168 // start a browser-initiated navigation besides those in CommonNavigationParams. | 170 // start a browser-initiated navigation besides those in CommonNavigationParams. |
169 // The difference with the RequestNavigationParams below is that they are only | 171 // The difference with the RequestNavigationParams below is that they are only |
170 // used in the current architecture of navigation, and will not be used by | 172 // used in the current architecture of navigation, and will not be used by |
171 // PlzNavigate. | 173 // PlzNavigate. |
172 // PlzNavigate: These are not used. | 174 // PlzNavigate: These are not used. |
173 struct CONTENT_EXPORT StartNavigationParams { | 175 struct CONTENT_EXPORT StartNavigationParams { |
174 StartNavigationParams(); | 176 StartNavigationParams(); |
175 StartNavigationParams( | 177 StartNavigationParams(const std::string& extra_headers, |
176 const std::string& extra_headers, | 178 const scoped_refptr<ResourceRequestBody>& post_data, |
177 const std::vector<unsigned char>& browser_initiated_post_data, | |
178 #if defined(OS_ANDROID) | 179 #if defined(OS_ANDROID) |
179 bool has_user_gesture, | 180 bool has_user_gesture, |
180 #endif | 181 #endif |
181 int transferred_request_child_id, | 182 int transferred_request_child_id, |
182 int transferred_request_request_id); | 183 int transferred_request_request_id); |
183 StartNavigationParams(const StartNavigationParams& other); | 184 StartNavigationParams(const StartNavigationParams& other); |
184 ~StartNavigationParams(); | 185 ~StartNavigationParams(); |
185 | 186 |
186 // Extra headers (separated by \n) to send during the request. | 187 // Extra headers (separated by \n) to send during the request. |
187 std::string extra_headers; | 188 std::string extra_headers; |
188 | 189 |
189 // If is_post is true, holds the post_data information from browser. Empty | 190 // Body of HTTP POST request. |
190 // otherwise. | 191 scoped_refptr<ResourceRequestBody> post_data; |
clamy
2016/05/20 15:49:14
Actually, I think this should be part of CommonNav
Łukasz Anforowicz
2016/05/20 22:18:47
Done. I've done that initially here, but then dec
| |
191 std::vector<unsigned char> browser_initiated_post_data; | |
192 | 192 |
193 #if defined(OS_ANDROID) | 193 #if defined(OS_ANDROID) |
194 bool has_user_gesture; | 194 bool has_user_gesture; |
195 #endif | 195 #endif |
196 | 196 |
197 // The following two members identify a previous request that has been | 197 // The following two members identify a previous request that has been |
198 // created before this navigation is being transferred to a new render view. | 198 // created before this navigation is being transferred to a new render view. |
199 // This serves the purpose of recycling the old request. | 199 // This serves the purpose of recycling the old request. |
200 // Unless this refers to a transferred navigation, these values are -1 and -1. | 200 // Unless this refers to a transferred navigation, these values are -1 and -1. |
201 int transferred_request_child_id; | 201 int transferred_request_child_id; |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
322 ~NavigationParams(); | 322 ~NavigationParams(); |
323 | 323 |
324 CommonNavigationParams common_params; | 324 CommonNavigationParams common_params; |
325 StartNavigationParams start_params; | 325 StartNavigationParams start_params; |
326 RequestNavigationParams request_params; | 326 RequestNavigationParams request_params; |
327 }; | 327 }; |
328 | 328 |
329 } // namespace content | 329 } // namespace content |
330 | 330 |
331 #endif // CONTENT_COMMON_NAVIGATION_PARAMS_H_ | 331 #endif // CONTENT_COMMON_NAVIGATION_PARAMS_H_ |
OLD | NEW |