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); |
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 for a browser-initiated navigation, this can override the |
| 114 // navigation_start value in Blink. |
| 115 // PlzNavigate: For renderer initiated navigations, this will be set on the |
| 116 // renderer side and sent with FrameHostMsg_BeginNavigation. |
| 117 base::TimeTicks navigation_start; |
110 }; | 118 }; |
111 | 119 |
112 // Provided by the renderer ---------------------------------------------------- | 120 // Provided by the renderer ---------------------------------------------------- |
113 // | 121 // |
114 // This struct holds parameters sent by the renderer to the browser. It is only | 122 // 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 | 123 // used in PlzNavigate (since in the current architecture, the renderer does not |
116 // inform the browser of navigations until they commit). | 124 // inform the browser of navigations until they commit). |
117 | 125 |
118 // This struct is not used outside of the PlzNavigate project. | 126 // This struct is not used outside of the PlzNavigate project. |
119 // PlzNavigate: parameters needed to start a navigation on the IO thread, | 127 // 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; | 205 int transferred_request_request_id; |
198 }; | 206 }; |
199 | 207 |
200 // Used by FrameMsg_Navigate. Holds the parameters needed by the renderer to | 208 // Used by FrameMsg_Navigate. Holds the parameters needed by the renderer to |
201 // start a browser-initiated navigation besides those in CommonNavigationParams. | 209 // start a browser-initiated navigation besides those in CommonNavigationParams. |
202 // PlzNavigate: sent to the renderer to make it issue a stream request for a | 210 // PlzNavigate: sent to the renderer to make it issue a stream request for a |
203 // navigation that is ready to commit. | 211 // navigation that is ready to commit. |
204 struct CONTENT_EXPORT RequestNavigationParams { | 212 struct CONTENT_EXPORT RequestNavigationParams { |
205 RequestNavigationParams(); | 213 RequestNavigationParams(); |
206 RequestNavigationParams(bool is_overriding_user_agent, | 214 RequestNavigationParams(bool is_overriding_user_agent, |
207 base::TimeTicks navigation_start, | |
208 const std::vector<GURL>& redirects, | 215 const std::vector<GURL>& redirects, |
209 bool can_load_local_resources, | 216 bool can_load_local_resources, |
210 base::Time request_time, | 217 base::Time request_time, |
211 const PageState& page_state, | 218 const PageState& page_state, |
212 int32 page_id, | 219 int32 page_id, |
213 int nav_entry_id, | 220 int nav_entry_id, |
214 bool is_same_document_history_load, | 221 bool is_same_document_history_load, |
215 bool has_committed_real_load, | 222 bool has_committed_real_load, |
216 bool intended_as_new_entry, | 223 bool intended_as_new_entry, |
217 int pending_history_list_offset, | 224 int pending_history_list_offset, |
218 int current_history_list_offset, | 225 int current_history_list_offset, |
219 int current_history_list_length, | 226 int current_history_list_length, |
220 bool should_clear_history_list); | 227 bool should_clear_history_list); |
221 ~RequestNavigationParams(); | 228 ~RequestNavigationParams(); |
222 | 229 |
223 // Whether or not the user agent override string should be used. | 230 // Whether or not the user agent override string should be used. |
224 bool is_overriding_user_agent; | 231 bool is_overriding_user_agent; |
225 | 232 |
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 | 233 // Any redirect URLs that occurred before |url|. Useful for cross-process |
230 // navigations; defaults to empty. | 234 // navigations; defaults to empty. |
231 std::vector<GURL> redirects; | 235 std::vector<GURL> redirects; |
232 | 236 |
233 // Whether or not this url should be allowed to access local file:// | 237 // Whether or not this url should be allowed to access local file:// |
234 // resources. | 238 // resources. |
235 bool can_load_local_resources; | 239 bool can_load_local_resources; |
236 | 240 |
237 // The time the request was created. This is used by the old performance | 241 // The time the request was created. This is used by the old performance |
238 // infrastructure to set up DocumentState associated with the RenderView. | 242 // infrastructure to set up DocumentState associated with the RenderView. |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 ~NavigationParams(); | 309 ~NavigationParams(); |
306 | 310 |
307 CommonNavigationParams common_params; | 311 CommonNavigationParams common_params; |
308 StartNavigationParams start_params; | 312 StartNavigationParams start_params; |
309 RequestNavigationParams request_params; | 313 RequestNavigationParams request_params; |
310 }; | 314 }; |
311 | 315 |
312 } // namespace content | 316 } // namespace content |
313 | 317 |
314 #endif // CONTENT_COMMON_NAVIGATION_PARAMS_H_ | 318 #endif // CONTENT_COMMON_NAVIGATION_PARAMS_H_ |
OLD | NEW |