| 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 <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 // The difference with the RequestNavigationParams below is that they are only | 135 // The difference with the RequestNavigationParams below is that they are only |
| 136 // used in the current architecture of navigation, and will not be used by | 136 // used in the current architecture of navigation, and will not be used by |
| 137 // PlzNavigate. | 137 // PlzNavigate. |
| 138 // PlzNavigate: These are not used. | 138 // PlzNavigate: These are not used. |
| 139 struct CONTENT_EXPORT StartNavigationParams { | 139 struct CONTENT_EXPORT StartNavigationParams { |
| 140 StartNavigationParams(); | 140 StartNavigationParams(); |
| 141 StartNavigationParams( | 141 StartNavigationParams( |
| 142 bool is_post, | 142 bool is_post, |
| 143 const std::string& extra_headers, | 143 const std::string& extra_headers, |
| 144 const std::vector<unsigned char>& browser_initiated_post_data, | 144 const std::vector<unsigned char>& browser_initiated_post_data, |
| 145 #if defined(OS_ANDROID) |
| 146 bool has_user_gesture, |
| 147 #endif |
| 145 int transferred_request_child_id, | 148 int transferred_request_child_id, |
| 146 int transferred_request_request_id); | 149 int transferred_request_request_id); |
| 147 ~StartNavigationParams(); | 150 ~StartNavigationParams(); |
| 148 | 151 |
| 149 // Whether the navigation is a POST request (as opposed to a GET). | 152 // Whether the navigation is a POST request (as opposed to a GET). |
| 150 bool is_post; | 153 bool is_post; |
| 151 | 154 |
| 152 // Extra headers (separated by \n) to send during the request. | 155 // Extra headers (separated by \n) to send during the request. |
| 153 std::string extra_headers; | 156 std::string extra_headers; |
| 154 | 157 |
| 155 // If is_post is true, holds the post_data information from browser. Empty | 158 // If is_post is true, holds the post_data information from browser. Empty |
| 156 // otherwise. | 159 // otherwise. |
| 157 std::vector<unsigned char> browser_initiated_post_data; | 160 std::vector<unsigned char> browser_initiated_post_data; |
| 158 | 161 |
| 162 #if defined(OS_ANDROID) |
| 163 bool has_user_gesture; |
| 164 #endif |
| 165 |
| 159 // The following two members identify a previous request that has been | 166 // The following two members identify a previous request that has been |
| 160 // created before this navigation is being transferred to a new render view. | 167 // created before this navigation is being transferred to a new render view. |
| 161 // This serves the purpose of recycling the old request. | 168 // This serves the purpose of recycling the old request. |
| 162 // Unless this refers to a transferred navigation, these values are -1 and -1. | 169 // Unless this refers to a transferred navigation, these values are -1 and -1. |
| 163 int transferred_request_child_id; | 170 int transferred_request_child_id; |
| 164 int transferred_request_request_id; | 171 int transferred_request_request_id; |
| 165 }; | 172 }; |
| 166 | 173 |
| 167 // Used by FrameMsg_Navigate. Holds the parameters needed by the renderer to | 174 // Used by FrameMsg_Navigate. Holds the parameters needed by the renderer to |
| 168 // start a browser-initiated navigation besides those in CommonNavigationParams. | 175 // start a browser-initiated navigation besides those in CommonNavigationParams. |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 ~NavigationParams(); | 268 ~NavigationParams(); |
| 262 | 269 |
| 263 CommonNavigationParams common_params; | 270 CommonNavigationParams common_params; |
| 264 StartNavigationParams start_params; | 271 StartNavigationParams start_params; |
| 265 RequestNavigationParams request_params; | 272 RequestNavigationParams request_params; |
| 266 }; | 273 }; |
| 267 | 274 |
| 268 } // namespace content | 275 } // namespace content |
| 269 | 276 |
| 270 #endif // CONTENT_COMMON_NAVIGATION_PARAMS_H_ | 277 #endif // CONTENT_COMMON_NAVIGATION_PARAMS_H_ |
| OLD | NEW |