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

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

Issue 2584513003: PlzNavigate: identify same-page browser-initiated navigation. (Closed)
Patch Set: Fix 2 WebContentsImplTest by assigning a document_sequence_number. Created 3 years, 11 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
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 <map> 10 #include <map>
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 // start a browser-initiated navigation besides those in CommonNavigationParams. 225 // start a browser-initiated navigation besides those in CommonNavigationParams.
226 // PlzNavigate: sent to the renderer to make it issue a stream request for a 226 // PlzNavigate: sent to the renderer to make it issue a stream request for a
227 // navigation that is ready to commit. 227 // navigation that is ready to commit.
228 struct CONTENT_EXPORT RequestNavigationParams { 228 struct CONTENT_EXPORT RequestNavigationParams {
229 RequestNavigationParams(); 229 RequestNavigationParams();
230 RequestNavigationParams(bool is_overriding_user_agent, 230 RequestNavigationParams(bool is_overriding_user_agent,
231 const std::vector<GURL>& redirects, 231 const std::vector<GURL>& redirects,
232 bool can_load_local_resources, 232 bool can_load_local_resources,
233 const PageState& page_state, 233 const PageState& page_state,
234 int nav_entry_id, 234 int nav_entry_id,
235 bool is_same_document_fragment_change,
nasko 2017/01/10 00:19:00 We are starting to accumulate a bunch of bool para
clamy 2017/01/10 10:52:54 We could also extend the FrameMsg_Navigate_Type::V
arthursonzogni 2017/01/12 17:32:30 It's a good thing to do. I like the idea with Fram
nasko 2017/01/13 02:51:09 Separate commit is definitely a good idea. It will
235 bool is_same_document_history_load, 236 bool is_same_document_history_load,
236 bool is_history_navigation_in_new_child, 237 bool is_history_navigation_in_new_child,
237 std::map<std::string, bool> subframe_unique_names, 238 std::map<std::string, bool> subframe_unique_names,
238 bool has_committed_real_load, 239 bool has_committed_real_load,
239 bool intended_as_new_entry, 240 bool intended_as_new_entry,
240 int pending_history_list_offset, 241 int pending_history_list_offset,
241 int current_history_list_offset, 242 int current_history_list_offset,
242 int current_history_list_length, 243 int current_history_list_length,
243 bool is_view_source, 244 bool is_view_source,
244 bool should_clear_history_list, 245 bool should_clear_history_list,
(...skipping 17 matching lines...) Expand all
262 263
263 // Opaque history state (received by ViewHostMsg_UpdateState). 264 // Opaque history state (received by ViewHostMsg_UpdateState).
264 PageState page_state; 265 PageState page_state;
265 266
266 // For browser-initiated navigations, this is the unique id of the 267 // For browser-initiated navigations, this is the unique id of the
267 // NavigationEntry being navigated to. (For renderer-initiated navigations it 268 // NavigationEntry being navigated to. (For renderer-initiated navigations it
268 // is 0.) If the load succeeds, then this nav_entry_id will be reflected in 269 // is 0.) If the load succeeds, then this nav_entry_id will be reflected in
269 // the resulting FrameHostMsg_DidCommitProvisionalLoad message. 270 // the resulting FrameHostMsg_DidCommitProvisionalLoad message.
270 int nav_entry_id; 271 int nav_entry_id;
271 272
273 // PlzNavigate
274 // Whether this navigation is differing only in the fragment compared to the
275 // current frame's URL. In that case, no network request should be made.
276 bool is_same_document_fragment_change;
277
272 // For history navigations, this indicates whether the load will stay within 278 // For history navigations, this indicates whether the load will stay within
273 // the same document. Defaults to false. 279 // the same document. Defaults to false.
274 bool is_same_document_history_load; 280 bool is_same_document_history_load;
275 281
276 // Whether this is a history navigation in a newly created child frame, in 282 // 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 283 // which case the browser process is instructing the renderer process to load
278 // a URL from a session history item. Defaults to false. 284 // a URL from a session history item. Defaults to false.
279 bool is_history_navigation_in_new_child; 285 bool is_history_navigation_in_new_child;
280 286
281 // If this is a history navigation, this contains a map of frame unique names 287 // If this is a history navigation, this contains a map of frame unique names
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 ~NavigationParams(); 365 ~NavigationParams();
360 366
361 CommonNavigationParams common_params; 367 CommonNavigationParams common_params;
362 StartNavigationParams start_params; 368 StartNavigationParams start_params;
363 RequestNavigationParams request_params; 369 RequestNavigationParams request_params;
364 }; 370 };
365 371
366 } // namespace content 372 } // namespace content
367 373
368 #endif // CONTENT_COMMON_NAVIGATION_PARAMS_H_ 374 #endif // CONTENT_COMMON_NAVIGATION_PARAMS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698