Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(613)

Side by Side Diff: content/common/navigation_params.h

Issue 2380943002: Tell renderer which subframes have history items on back/forward. (Closed)
Patch Set: Fix const ref. Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/common/frame_messages.h ('k') | content/common/navigation_params.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <set>
10 #include <string> 11 #include <string>
11 12
12 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
13 #include "base/time/time.h" 14 #include "base/time/time.h"
14 #include "build/build_config.h" 15 #include "build/build_config.h"
15 #include "content/common/content_export.h" 16 #include "content/common/content_export.h"
16 #include "content/common/frame_message_enums.h" 17 #include "content/common/frame_message_enums.h"
17 #include "content/common/resource_request_body_impl.h" 18 #include "content/common/resource_request_body_impl.h"
18 #include "content/public/common/page_state.h" 19 #include "content/public/common/page_state.h"
19 #include "content/public/common/referrer.h" 20 #include "content/public/common/referrer.h"
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 RequestNavigationParams(); 222 RequestNavigationParams();
222 RequestNavigationParams(bool is_overriding_user_agent, 223 RequestNavigationParams(bool is_overriding_user_agent,
223 const std::vector<GURL>& redirects, 224 const std::vector<GURL>& redirects,
224 bool can_load_local_resources, 225 bool can_load_local_resources,
225 base::Time request_time, 226 base::Time request_time,
226 const PageState& page_state, 227 const PageState& page_state,
227 int32_t page_id, 228 int32_t page_id,
228 int nav_entry_id, 229 int nav_entry_id,
229 bool is_same_document_history_load, 230 bool is_same_document_history_load,
230 bool is_history_navigation_in_new_child, 231 bool is_history_navigation_in_new_child,
231 bool has_subtree_history_items, 232 std::set<std::string> subframe_unique_names,
232 bool has_committed_real_load, 233 bool has_committed_real_load,
233 bool intended_as_new_entry, 234 bool intended_as_new_entry,
234 int pending_history_list_offset, 235 int pending_history_list_offset,
235 int current_history_list_offset, 236 int current_history_list_offset,
236 int current_history_list_length, 237 int current_history_list_length,
237 bool is_view_source, 238 bool is_view_source,
238 bool should_clear_history_list); 239 bool should_clear_history_list);
239 RequestNavigationParams(const RequestNavigationParams& other); 240 RequestNavigationParams(const RequestNavigationParams& other);
240 ~RequestNavigationParams(); 241 ~RequestNavigationParams();
241 242
(...skipping 30 matching lines...) Expand all
272 273
273 // For history navigations, this indicates whether the load will stay within 274 // For history navigations, this indicates whether the load will stay within
274 // the same document. Defaults to false. 275 // the same document. Defaults to false.
275 bool is_same_document_history_load; 276 bool is_same_document_history_load;
276 277
277 // Whether this is a history navigation in a newly created child frame, in 278 // Whether this is a history navigation in a newly created child frame, in
278 // which case the browser process is instructing the renderer process to load 279 // which case the browser process is instructing the renderer process to load
279 // a URL from a session history item. Defaults to false. 280 // a URL from a session history item. Defaults to false.
280 bool is_history_navigation_in_new_child; 281 bool is_history_navigation_in_new_child;
281 282
282 // If this is a history navigation, this indicates whether the browser process 283 // If this is a history navigation, this contains a set of frame unique names
283 // is aware of any subframe history items for the given frame. If not, the 284 // for immediate children of the frame being navigated for which there are
284 // renderer does not need to check with the browser if any subframes are 285 // history items. The renderer process only needs to check with the browser
285 // created during the navigation. 286 // process for newly created subframes that have these unique names.
286 // TODO(creis): Expand this to a data structure of unique names and 287 // TODO(creis): Expand this to a data structure including corresponding
287 // corresponding PageStates in https://crbug.com/639842. 288 // same-process PageStates as well in https://crbug.com/639842.
288 bool has_subtree_history_items; 289 std::set<std::string> subframe_unique_names;
289 290
290 // Whether the frame being navigated has already committed a real page, which 291 // Whether the frame being navigated has already committed a real page, which
291 // affects how new navigations are classified in the renderer process. 292 // affects how new navigations are classified in the renderer process.
292 // This currently is only ever set to true in --site-per-process mode. 293 // This currently is only ever set to true in --site-per-process mode.
293 // TODO(creis): Create FrameNavigationEntries by default so this always works. 294 // TODO(creis): Create FrameNavigationEntries by default so this always works.
294 bool has_committed_real_load; 295 bool has_committed_real_load;
295 296
296 // For browser-initiated navigations, this is true if this is a new entry 297 // For browser-initiated navigations, this is true if this is a new entry
297 // being navigated to. This is false otherwise. TODO(avi): Remove this when 298 // being navigated to. This is false otherwise. TODO(avi): Remove this when
298 // the pending entry situation is made sane and the browser keeps them around 299 // the pending entry situation is made sane and the browser keeps them around
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 ~NavigationParams(); 353 ~NavigationParams();
353 354
354 CommonNavigationParams common_params; 355 CommonNavigationParams common_params;
355 StartNavigationParams start_params; 356 StartNavigationParams start_params;
356 RequestNavigationParams request_params; 357 RequestNavigationParams request_params;
357 }; 358 };
358 359
359 } // namespace content 360 } // namespace content
360 361
361 #endif // CONTENT_COMMON_NAVIGATION_PARAMS_H_ 362 #endif // CONTENT_COMMON_NAVIGATION_PARAMS_H_
OLDNEW
« no previous file with comments | « content/common/frame_messages.h ('k') | content/common/navigation_params.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698