| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 // navigation that is ready to commit. | 219 // navigation that is ready to commit. |
| 220 struct CONTENT_EXPORT RequestNavigationParams { | 220 struct CONTENT_EXPORT RequestNavigationParams { |
| 221 RequestNavigationParams(); | 221 RequestNavigationParams(); |
| 222 RequestNavigationParams(bool is_overriding_user_agent, | 222 RequestNavigationParams(bool is_overriding_user_agent, |
| 223 const std::vector<GURL>& redirects, | 223 const std::vector<GURL>& redirects, |
| 224 bool can_load_local_resources, | 224 bool can_load_local_resources, |
| 225 const PageState& page_state, | 225 const PageState& page_state, |
| 226 int nav_entry_id, | 226 int nav_entry_id, |
| 227 bool is_same_document_history_load, | 227 bool is_same_document_history_load, |
| 228 bool is_history_navigation_in_new_child, | 228 bool is_history_navigation_in_new_child, |
| 229 std::map<std::string, bool> subframe_unique_names, | 229 std::map<std::string, PageState> subtree_page_states, |
| 230 bool has_committed_real_load, | 230 bool has_committed_real_load, |
| 231 bool intended_as_new_entry, | 231 bool intended_as_new_entry, |
| 232 int pending_history_list_offset, | 232 int pending_history_list_offset, |
| 233 int current_history_list_offset, | 233 int current_history_list_offset, |
| 234 int current_history_list_length, | 234 int current_history_list_length, |
| 235 bool is_view_source, | 235 bool is_view_source, |
| 236 bool should_clear_history_list); | 236 bool should_clear_history_list); |
| 237 RequestNavigationParams(const RequestNavigationParams& other); | 237 RequestNavigationParams(const RequestNavigationParams& other); |
| 238 ~RequestNavigationParams(); | 238 ~RequestNavigationParams(); |
| 239 | 239 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 263 // For history navigations, this indicates whether the load will stay within | 263 // For history navigations, this indicates whether the load will stay within |
| 264 // the same document. Defaults to false. | 264 // the same document. Defaults to false. |
| 265 bool is_same_document_history_load; | 265 bool is_same_document_history_load; |
| 266 | 266 |
| 267 // Whether this is a history navigation in a newly created child frame, in | 267 // Whether this is a history navigation in a newly created child frame, in |
| 268 // which case the browser process is instructing the renderer process to load | 268 // which case the browser process is instructing the renderer process to load |
| 269 // a URL from a session history item. Defaults to false. | 269 // a URL from a session history item. Defaults to false. |
| 270 bool is_history_navigation_in_new_child; | 270 bool is_history_navigation_in_new_child; |
| 271 | 271 |
| 272 // If this is a history navigation, this contains a map of frame unique names | 272 // If this is a history navigation, this contains a map of frame unique names |
| 273 // to |is_about_blank| for immediate children of the frame being navigated for | 273 // to PageStates for all descendants of the frame being navigated that have |
| 274 // which there are history items. The renderer process only needs to check | 274 // history items. When creating a new subframe during a back/forward |
| 275 // with the browser process for newly created subframes that have these unique | 275 // navigation, the renderer can use these PageStates for newly created |
| 276 // names (and only when not staying on about:blank). | 276 // subframes. Note that if the PageState is empty, it corresponds to a |
| 277 // TODO(creis): Expand this to a data structure including corresponding | 277 // history item that will be loaded in a different process, and thus the |
| 278 // same-process PageStates for the whole subtree in https://crbug.com/639842. | 278 // renderer process should ask the browser process to handle it instead. |
| 279 std::map<std::string, bool> subframe_unique_names; | 279 std::map<std::string, PageState> subtree_page_states; |
| 280 | 280 |
| 281 // Whether the frame being navigated has already committed a real page, which | 281 // Whether the frame being navigated has already committed a real page, which |
| 282 // affects how new navigations are classified in the renderer process. | 282 // affects how new navigations are classified in the renderer process. |
| 283 // This currently is only ever set to true in --site-per-process mode. | 283 // This currently is only ever set to true in --site-per-process mode. |
| 284 // TODO(creis): Create FrameNavigationEntries by default so this always works. | 284 // TODO(creis): Create FrameNavigationEntries by default so this always works. |
| 285 bool has_committed_real_load; | 285 bool has_committed_real_load; |
| 286 | 286 |
| 287 // For browser-initiated navigations, this is true if this is a new entry | 287 // For browser-initiated navigations, this is true if this is a new entry |
| 288 // being navigated to. This is false otherwise. TODO(avi): Remove this when | 288 // being navigated to. This is false otherwise. TODO(avi): Remove this when |
| 289 // the pending entry situation is made sane and the browser keeps them around | 289 // the pending entry situation is made sane and the browser keeps them around |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 ~NavigationParams(); | 347 ~NavigationParams(); |
| 348 | 348 |
| 349 CommonNavigationParams common_params; | 349 CommonNavigationParams common_params; |
| 350 StartNavigationParams start_params; | 350 StartNavigationParams start_params; |
| 351 RequestNavigationParams request_params; | 351 RequestNavigationParams request_params; |
| 352 }; | 352 }; |
| 353 | 353 |
| 354 } // namespace content | 354 } // namespace content |
| 355 | 355 |
| 356 #endif // CONTENT_COMMON_NAVIGATION_PARAMS_H_ | 356 #endif // CONTENT_COMMON_NAVIGATION_PARAMS_H_ |
| OLD | NEW |