| 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 24 matching lines...) Expand all Loading... |
| 35 // Provided by the browser or the renderer ------------------------------------- | 35 // Provided by the browser or the renderer ------------------------------------- |
| 36 | 36 |
| 37 // Used by all navigation IPCs. | 37 // Used by all navigation IPCs. |
| 38 struct CONTENT_EXPORT CommonNavigationParams { | 38 struct CONTENT_EXPORT CommonNavigationParams { |
| 39 CommonNavigationParams(); | 39 CommonNavigationParams(); |
| 40 CommonNavigationParams(const GURL& url, | 40 CommonNavigationParams(const GURL& url, |
| 41 const Referrer& referrer, | 41 const Referrer& referrer, |
| 42 ui::PageTransition transition, | 42 ui::PageTransition transition, |
| 43 FrameMsg_Navigate_Type::Value navigation_type, | 43 FrameMsg_Navigate_Type::Value navigation_type, |
| 44 bool allow_download, | 44 bool allow_download, |
| 45 bool should_replace_current_entry, |
| 45 base::TimeTicks ui_timestamp, | 46 base::TimeTicks ui_timestamp, |
| 46 FrameMsg_UILoadMetricsReportType::Value report_type, | 47 FrameMsg_UILoadMetricsReportType::Value report_type, |
| 47 const GURL& base_url_for_data_url, | 48 const GURL& base_url_for_data_url, |
| 48 const GURL& history_url_for_data_url); | 49 const GURL& history_url_for_data_url); |
| 49 ~CommonNavigationParams(); | 50 ~CommonNavigationParams(); |
| 50 | 51 |
| 51 // The URL to navigate to. | 52 // The URL to navigate to. |
| 52 // PlzNavigate: May be modified when the navigation is ready to commit. | 53 // PlzNavigate: May be modified when the navigation is ready to commit. |
| 53 GURL url; | 54 GURL url; |
| 54 | 55 |
| 55 // The URL to send in the "Referer" header field. Can be empty if there is | 56 // The URL to send in the "Referer" header field. Can be empty if there is |
| 56 // no referrer. | 57 // no referrer. |
| 57 Referrer referrer; | 58 Referrer referrer; |
| 58 | 59 |
| 59 // The type of transition. | 60 // The type of transition. |
| 60 ui::PageTransition transition; | 61 ui::PageTransition transition; |
| 61 | 62 |
| 62 // Type of navigation. | 63 // Type of navigation. |
| 63 FrameMsg_Navigate_Type::Value navigation_type; | 64 FrameMsg_Navigate_Type::Value navigation_type; |
| 64 | 65 |
| 65 // Allows the URL to be downloaded (true by default). | 66 // Allows the URL to be downloaded (true by default). |
| 66 // Avoid downloading when in view-source mode. | 67 // Avoid downloading when in view-source mode. |
| 67 bool allow_download; | 68 bool allow_download; |
| 68 | 69 |
| 70 // Informs the RenderView the pending navigation should replace the current |
| 71 // history entry when it commits. This is used for cross-process redirects so |
| 72 // the transferred navigation can recover the navigation state. |
| 73 // PlzNavigate: this is used by client-side redirects to indicate that when |
| 74 // the navigation commits, it should commit in the existing page. |
| 75 bool should_replace_current_entry; |
| 76 |
| 69 // Timestamp of the user input event that triggered this navigation. Empty if | 77 // Timestamp of the user input event that triggered this navigation. Empty if |
| 70 // the navigation was not triggered by clicking on a link or by receiving an | 78 // the navigation was not triggered by clicking on a link or by receiving an |
| 71 // intent on Android. | 79 // intent on Android. |
| 72 base::TimeTicks ui_timestamp; | 80 base::TimeTicks ui_timestamp; |
| 73 | 81 |
| 74 // The report type to be used when recording the metric using |ui_timestamp|. | 82 // The report type to be used when recording the metric using |ui_timestamp|. |
| 75 FrameMsg_UILoadMetricsReportType::Value report_type; | 83 FrameMsg_UILoadMetricsReportType::Value report_type; |
| 76 | 84 |
| 77 // Base URL for use in Blink's SubstituteData. | 85 // Base URL for use in Blink's SubstituteData. |
| 78 // Is only used with data: URLs. | 86 // Is only used with data: URLs. |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 // The difference with the RequestNavigationParams below is that they are only | 135 // The difference with the RequestNavigationParams below is that they are only |
| 128 // 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 |
| 129 // PlzNavigate. | 137 // PlzNavigate. |
| 130 // PlzNavigate: These are not used. | 138 // PlzNavigate: These are not used. |
| 131 struct CONTENT_EXPORT StartNavigationParams { | 139 struct CONTENT_EXPORT StartNavigationParams { |
| 132 StartNavigationParams(); | 140 StartNavigationParams(); |
| 133 StartNavigationParams( | 141 StartNavigationParams( |
| 134 bool is_post, | 142 bool is_post, |
| 135 const std::string& extra_headers, | 143 const std::string& extra_headers, |
| 136 const std::vector<unsigned char>& browser_initiated_post_data, | 144 const std::vector<unsigned char>& browser_initiated_post_data, |
| 137 bool should_replace_current_entry, | |
| 138 int transferred_request_child_id, | 145 int transferred_request_child_id, |
| 139 int transferred_request_request_id); | 146 int transferred_request_request_id); |
| 140 ~StartNavigationParams(); | 147 ~StartNavigationParams(); |
| 141 | 148 |
| 142 // Whether the navigation is a POST request (as opposed to a GET). | 149 // Whether the navigation is a POST request (as opposed to a GET). |
| 143 bool is_post; | 150 bool is_post; |
| 144 | 151 |
| 145 // Extra headers (separated by \n) to send during the request. | 152 // Extra headers (separated by \n) to send during the request. |
| 146 std::string extra_headers; | 153 std::string extra_headers; |
| 147 | 154 |
| 148 // If is_post is true, holds the post_data information from browser. Empty | 155 // If is_post is true, holds the post_data information from browser. Empty |
| 149 // otherwise. | 156 // otherwise. |
| 150 std::vector<unsigned char> browser_initiated_post_data; | 157 std::vector<unsigned char> browser_initiated_post_data; |
| 151 | 158 |
| 152 // Informs the RenderView the pending navigation should replace the current | |
| 153 // history entry when it commits. This is used for cross-process redirects so | |
| 154 // the transferred navigation can recover the navigation state. | |
| 155 bool should_replace_current_entry; | |
| 156 | |
| 157 // The following two members identify a previous request that has been | 159 // The following two members identify a previous request that has been |
| 158 // created before this navigation is being transferred to a new render view. | 160 // created before this navigation is being transferred to a new render view. |
| 159 // This serves the purpose of recycling the old request. | 161 // This serves the purpose of recycling the old request. |
| 160 // Unless this refers to a transferred navigation, these values are -1 and -1. | 162 // Unless this refers to a transferred navigation, these values are -1 and -1. |
| 161 int transferred_request_child_id; | 163 int transferred_request_child_id; |
| 162 int transferred_request_request_id; | 164 int transferred_request_request_id; |
| 163 }; | 165 }; |
| 164 | 166 |
| 165 // Used by FrameMsg_Navigate. Holds the parameters needed by the renderer to | 167 // Used by FrameMsg_Navigate. Holds the parameters needed by the renderer to |
| 166 // start a browser-initiated navigation besides those in CommonNavigationParams. | 168 // start a browser-initiated navigation besides those in CommonNavigationParams. |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 ~NavigationParams(); | 261 ~NavigationParams(); |
| 260 | 262 |
| 261 CommonNavigationParams common_params; | 263 CommonNavigationParams common_params; |
| 262 StartNavigationParams start_params; | 264 StartNavigationParams start_params; |
| 263 RequestNavigationParams request_params; | 265 RequestNavigationParams request_params; |
| 264 }; | 266 }; |
| 265 | 267 |
| 266 } // namespace content | 268 } // namespace content |
| 267 | 269 |
| 268 #endif // CONTENT_COMMON_NAVIGATION_PARAMS_H_ | 270 #endif // CONTENT_COMMON_NAVIGATION_PARAMS_H_ |
| OLD | NEW |