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