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

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

Issue 2445053002: Fix history nav to a script-injected about:blank frame. (Closed)
Patch Set: Created 4 years, 1 month 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/browser/frame_host/navigation_request.cc ('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 <map>
11 #include <string> 11 #include <string>
12 12
13 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
14 #include "base/time/time.h" 14 #include "base/time/time.h"
15 #include "build/build_config.h" 15 #include "build/build_config.h"
16 #include "content/common/content_export.h" 16 #include "content/common/content_export.h"
17 #include "content/common/frame_message_enums.h" 17 #include "content/common/frame_message_enums.h"
18 #include "content/common/resource_request_body_impl.h" 18 #include "content/common/resource_request_body_impl.h"
19 #include "content/public/common/page_state.h" 19 #include "content/public/common/page_state.h"
20 #include "content/public/common/referrer.h" 20 #include "content/public/common/referrer.h"
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 RequestNavigationParams(); 216 RequestNavigationParams();
217 RequestNavigationParams(bool is_overriding_user_agent, 217 RequestNavigationParams(bool is_overriding_user_agent,
218 const std::vector<GURL>& redirects, 218 const std::vector<GURL>& redirects,
219 bool can_load_local_resources, 219 bool can_load_local_resources,
220 base::Time request_time, 220 base::Time request_time,
221 const PageState& page_state, 221 const PageState& page_state,
222 int32_t page_id, 222 int32_t page_id,
223 int nav_entry_id, 223 int nav_entry_id,
224 bool is_same_document_history_load, 224 bool is_same_document_history_load,
225 bool is_history_navigation_in_new_child, 225 bool is_history_navigation_in_new_child,
226 std::set<std::string> subframe_unique_names, 226 std::map<std::string, bool> subframe_unique_names,
227 bool has_committed_real_load, 227 bool has_committed_real_load,
228 bool intended_as_new_entry, 228 bool intended_as_new_entry,
229 int pending_history_list_offset, 229 int pending_history_list_offset,
230 int current_history_list_offset, 230 int current_history_list_offset,
231 int current_history_list_length, 231 int current_history_list_length,
232 bool is_view_source, 232 bool is_view_source,
233 bool should_clear_history_list, 233 bool should_clear_history_list,
234 bool has_user_gesture); 234 bool has_user_gesture);
235 RequestNavigationParams(const RequestNavigationParams& other); 235 RequestNavigationParams(const RequestNavigationParams& other);
236 ~RequestNavigationParams(); 236 ~RequestNavigationParams();
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 271
272 // For history navigations, this indicates whether the load will stay within 272 // For history navigations, this indicates whether the load will stay within
273 // the same document. Defaults to false. 273 // the same document. Defaults to false.
274 bool is_same_document_history_load; 274 bool is_same_document_history_load;
275 275
276 // Whether this is a history navigation in a newly created child frame, in 276 // Whether this is a history navigation in a newly created child frame, in
277 // which case the browser process is instructing the renderer process to load 277 // which case the browser process is instructing the renderer process to load
278 // a URL from a session history item. Defaults to false. 278 // a URL from a session history item. Defaults to false.
279 bool is_history_navigation_in_new_child; 279 bool is_history_navigation_in_new_child;
280 280
281 // If this is a history navigation, this contains a set of frame unique names 281 // If this is a history navigation, this contains a map of frame unique names
282 // for immediate children of the frame being navigated for which there are 282 // to |is_about_blank| for immediate children of the frame being navigated for
283 // history items. The renderer process only needs to check with the browser 283 // which there are history items. The renderer process only needs to check
284 // process for newly created subframes that have these unique names. 284 // with the browser process for newly created subframes that have these unique
285 // names (and only when not staying on about:blank).
285 // TODO(creis): Expand this to a data structure including corresponding 286 // TODO(creis): Expand this to a data structure including corresponding
286 // same-process PageStates as well in https://crbug.com/639842. 287 // same-process PageStates for the whole subtree in https://crbug.com/639842.
287 std::set<std::string> subframe_unique_names; 288 std::map<std::string, bool> subframe_unique_names;
288 289
289 // Whether the frame being navigated has already committed a real page, which 290 // Whether the frame being navigated has already committed a real page, which
290 // affects how new navigations are classified in the renderer process. 291 // affects how new navigations are classified in the renderer process.
291 // This currently is only ever set to true in --site-per-process mode. 292 // This currently is only ever set to true in --site-per-process mode.
292 // TODO(creis): Create FrameNavigationEntries by default so this always works. 293 // TODO(creis): Create FrameNavigationEntries by default so this always works.
293 bool has_committed_real_load; 294 bool has_committed_real_load;
294 295
295 // For browser-initiated navigations, this is true if this is a new entry 296 // For browser-initiated navigations, this is true if this is a new entry
296 // being navigated to. This is false otherwise. TODO(avi): Remove this when 297 // being navigated to. This is false otherwise. TODO(avi): Remove this when
297 // the pending entry situation is made sane and the browser keeps them around 298 // the pending entry situation is made sane and the browser keeps them around
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 ~NavigationParams(); 355 ~NavigationParams();
355 356
356 CommonNavigationParams common_params; 357 CommonNavigationParams common_params;
357 StartNavigationParams start_params; 358 StartNavigationParams start_params;
358 RequestNavigationParams request_params; 359 RequestNavigationParams request_params;
359 }; 360 };
360 361
361 } // namespace content 362 } // namespace content
362 363
363 #endif // CONTENT_COMMON_NAVIGATION_PARAMS_H_ 364 #endif // CONTENT_COMMON_NAVIGATION_PARAMS_H_
OLDNEW
« no previous file with comments | « content/browser/frame_host/navigation_request.cc ('k') | content/common/navigation_params.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698