Chromium Code Reviews| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 53 CommonNavigationParams(const GURL& url, | 53 CommonNavigationParams(const GURL& url, |
| 54 const Referrer& referrer, | 54 const Referrer& referrer, |
| 55 ui::PageTransition transition, | 55 ui::PageTransition transition, |
| 56 FrameMsg_Navigate_Type::Value navigation_type, | 56 FrameMsg_Navigate_Type::Value navigation_type, |
| 57 bool allow_download, | 57 bool allow_download, |
| 58 bool should_replace_current_entry, | 58 bool should_replace_current_entry, |
| 59 base::TimeTicks ui_timestamp, | 59 base::TimeTicks ui_timestamp, |
| 60 FrameMsg_UILoadMetricsReportType::Value report_type, | 60 FrameMsg_UILoadMetricsReportType::Value report_type, |
| 61 const GURL& base_url_for_data_url, | 61 const GURL& base_url_for_data_url, |
| 62 const GURL& history_url_for_data_url, | 62 const GURL& history_url_for_data_url, |
| 63 LoFiState lofi_state); | 63 LoFiState lofi_state, |
| 64 const base::TimeTicks& navigation_start); | |
|
clamy
2015/11/02 17:34:35
In which cases are we creating CommonNavigationPar
Charlie Harrison
2015/11/02 18:19:10
A few places:
- ConstructCommonNavigationParams us
| |
| 64 ~CommonNavigationParams(); | 65 ~CommonNavigationParams(); |
| 65 | 66 |
| 66 // The URL to navigate to. | 67 // The URL to navigate to. |
| 67 // PlzNavigate: May be modified when the navigation is ready to commit. | 68 // PlzNavigate: May be modified when the navigation is ready to commit. |
| 68 GURL url; | 69 GURL url; |
| 69 | 70 |
| 70 // The URL to send in the "Referer" header field. Can be empty if there is | 71 // The URL to send in the "Referer" header field. Can be empty if there is |
| 71 // no referrer. | 72 // no referrer. |
| 72 Referrer referrer; | 73 Referrer referrer; |
| 73 | 74 |
| (...skipping 26 matching lines...) Expand all Loading... | |
| 100 // Is only used with data: URLs. | 101 // Is only used with data: URLs. |
| 101 GURL base_url_for_data_url; | 102 GURL base_url_for_data_url; |
| 102 | 103 |
| 103 // History URL for use in Blink's SubstituteData. | 104 // History URL for use in Blink's SubstituteData. |
| 104 // Is only used with data: URLs. | 105 // Is only used with data: URLs. |
| 105 GURL history_url_for_data_url; | 106 GURL history_url_for_data_url; |
| 106 | 107 |
| 107 // Whether or not to request a LoFi version of the document or let the browser | 108 // Whether or not to request a LoFi version of the document or let the browser |
| 108 // decide. | 109 // decide. |
| 109 LoFiState lofi_state; | 110 LoFiState lofi_state; |
| 111 | |
| 112 // The navigationStart time exposed through the Navigation Timing API to JS. | |
| 113 // If this is a browser-initiated navigation, this will override the | |
| 114 // navigation_start value in Blink. If this is a renderer-initiated | |
| 115 // navigation, this will be recorded in the renderer. | |
| 116 base::TimeTicks navigation_start; | |
| 110 }; | 117 }; |
| 111 | 118 |
| 112 // Provided by the renderer ---------------------------------------------------- | 119 // Provided by the renderer ---------------------------------------------------- |
| 113 // | 120 // |
| 114 // This struct holds parameters sent by the renderer to the browser. It is only | 121 // This struct holds parameters sent by the renderer to the browser. It is only |
| 115 // used in PlzNavigate (since in the current architecture, the renderer does not | 122 // used in PlzNavigate (since in the current architecture, the renderer does not |
| 116 // inform the browser of navigations until they commit). | 123 // inform the browser of navigations until they commit). |
| 117 | 124 |
| 118 // This struct is not used outside of the PlzNavigate project. | 125 // This struct is not used outside of the PlzNavigate project. |
| 119 // PlzNavigate: parameters needed to start a navigation on the IO thread, | 126 // PlzNavigate: parameters needed to start a navigation on the IO thread, |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 197 int transferred_request_request_id; | 204 int transferred_request_request_id; |
| 198 }; | 205 }; |
| 199 | 206 |
| 200 // Used by FrameMsg_Navigate. Holds the parameters needed by the renderer to | 207 // Used by FrameMsg_Navigate. Holds the parameters needed by the renderer to |
| 201 // start a browser-initiated navigation besides those in CommonNavigationParams. | 208 // start a browser-initiated navigation besides those in CommonNavigationParams. |
| 202 // PlzNavigate: sent to the renderer to make it issue a stream request for a | 209 // PlzNavigate: sent to the renderer to make it issue a stream request for a |
| 203 // navigation that is ready to commit. | 210 // navigation that is ready to commit. |
| 204 struct CONTENT_EXPORT RequestNavigationParams { | 211 struct CONTENT_EXPORT RequestNavigationParams { |
| 205 RequestNavigationParams(); | 212 RequestNavigationParams(); |
| 206 RequestNavigationParams(bool is_overriding_user_agent, | 213 RequestNavigationParams(bool is_overriding_user_agent, |
| 207 base::TimeTicks navigation_start, | |
| 208 const std::vector<GURL>& redirects, | 214 const std::vector<GURL>& redirects, |
| 209 bool can_load_local_resources, | 215 bool can_load_local_resources, |
| 210 base::Time request_time, | 216 base::Time request_time, |
| 211 const PageState& page_state, | 217 const PageState& page_state, |
| 212 int32 page_id, | 218 int32 page_id, |
| 213 int nav_entry_id, | 219 int nav_entry_id, |
| 214 bool is_same_document_history_load, | 220 bool is_same_document_history_load, |
| 215 bool has_committed_real_load, | 221 bool has_committed_real_load, |
| 216 bool intended_as_new_entry, | 222 bool intended_as_new_entry, |
| 217 int pending_history_list_offset, | 223 int pending_history_list_offset, |
| 218 int current_history_list_offset, | 224 int current_history_list_offset, |
| 219 int current_history_list_length, | 225 int current_history_list_length, |
| 220 bool should_clear_history_list); | 226 bool should_clear_history_list); |
| 221 ~RequestNavigationParams(); | 227 ~RequestNavigationParams(); |
| 222 | 228 |
| 223 // Whether or not the user agent override string should be used. | 229 // Whether or not the user agent override string should be used. |
| 224 bool is_overriding_user_agent; | 230 bool is_overriding_user_agent; |
| 225 | 231 |
| 226 // The navigationStart time to expose through the Navigation Timing API to JS. | |
| 227 base::TimeTicks browser_navigation_start; | |
| 228 | |
| 229 // Any redirect URLs that occurred before |url|. Useful for cross-process | 232 // Any redirect URLs that occurred before |url|. Useful for cross-process |
| 230 // navigations; defaults to empty. | 233 // navigations; defaults to empty. |
| 231 std::vector<GURL> redirects; | 234 std::vector<GURL> redirects; |
| 232 | 235 |
| 233 // Whether or not this url should be allowed to access local file:// | 236 // Whether or not this url should be allowed to access local file:// |
| 234 // resources. | 237 // resources. |
| 235 bool can_load_local_resources; | 238 bool can_load_local_resources; |
| 236 | 239 |
| 237 // The time the request was created. This is used by the old performance | 240 // The time the request was created. This is used by the old performance |
| 238 // infrastructure to set up DocumentState associated with the RenderView. | 241 // infrastructure to set up DocumentState associated with the RenderView. |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 305 ~NavigationParams(); | 308 ~NavigationParams(); |
| 306 | 309 |
| 307 CommonNavigationParams common_params; | 310 CommonNavigationParams common_params; |
| 308 StartNavigationParams start_params; | 311 StartNavigationParams start_params; |
| 309 RequestNavigationParams request_params; | 312 RequestNavigationParams request_params; |
| 310 }; | 313 }; |
| 311 | 314 |
| 312 } // namespace content | 315 } // namespace content |
| 313 | 316 |
| 314 #endif // CONTENT_COMMON_NAVIGATION_PARAMS_H_ | 317 #endif // CONTENT_COMMON_NAVIGATION_PARAMS_H_ |
| OLD | NEW |