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

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

Issue 483773002: PlzNavigate: implement CommitNavigation on the browser side (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Split the class into structs used by IPCs Created 6 years, 3 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_COMMON_NAVIGATION_PARAMS_H_
6 #define CONTENT_COMMON_NAVIGATION_PARAMS_H_
7
8 #include <string>
9
10 #include "base/basictypes.h"
11 #include "base/time/time.h"
12 #include "content/common/frame_message_enums.h"
13 #include "content/public/common/page_state.h"
14 #include "content/public/common/page_transition_types.h"
15 #include "content/public/common/referrer.h"
16 #include "url/gurl.h"
17
18 namespace content {
19
20 // The following structures hold parameters used during a navigation. In
21 // particular, FrameMsg_Navigate_Params, FrameMsg_CommitNavigation_Params and
22 // FrameHostMsg_BeginNavigation_Params are subclasses of these structures.
23 struct CoreNavigationParams {
24 CoreNavigationParams();
25 ~CoreNavigationParams();
26 // The URL to navigate to.
27 // PlzNavigate: May be modified when the navigation is ready to commit.
28 GURL url;
29
30 // The URL to send in the "Referer" header field. Can be empty if there is
31 // no referrer.
32 Referrer referrer;
33
34 // The type of transition.
35 PageTransition transition;
36 };
37
38 struct NavigationParamsWithCommitInfo : CoreNavigationParams {
Charlie Reis 2014/09/15 21:19:40 Please add a comment saying what stage(s) of navig
39 NavigationParamsWithCommitInfo();
40 ~NavigationParamsWithCommitInfo();
41 // The page_id for this navigation, or -1 if it is a new navigation. Back,
42 // Forward, and Reload navigations should have a valid page_id. If the load
43 // succeeds, then this page_id will be reflected in the resultant
44 // FrameHostMsg_DidCommitProvisionalLoad message.
45 int32 page_id;
46
47 // Informs the RenderView the session history should be cleared. In that
48 // case, the RenderView needs to notify the browser that the clearing was
49 // succesful when the navigation commits.
50 bool should_clear_history_list;
51
52 // If page_id is -1, then pending_history_list_offset will also be -1.
53 // Otherwise, it contains the offset into the history list corresponding to
54 // the current navigation.
55 int pending_history_list_offset;
56
57 // Used to inform the RenderFrame of where its current page contents reside in
58 // session history and the total size of the session history list.
59 int current_history_list_offset;
60 int current_history_list_length;
61
62 // Opaque history state (received by ViewHostMsg_UpdateState).
63 PageState page_state;
64
65 // Type of navigation.
66 FrameMsg_Navigate_Type::Value navigation_type;
67
68 // Whether or not the user agent override string should be used.
69 bool is_overriding_user_agent;
70
71 // The navigationStart time to expose through the Navigation Timing API to JS.
72 base::TimeTicks browser_navigation_start;
73 };
74
75 struct NavigationParamsWithRequestAndCommitInfo :
Charlie Reis 2014/09/15 21:19:40 Please add a comment saying when this is used. At
76 NavigationParamsWithCommitInfo {
77 NavigationParamsWithRequestAndCommitInfo();
78 ~NavigationParamsWithRequestAndCommitInfo();
79 bool is_post;
Charlie Reis 2014/09/15 21:19:40 Please add a comment here.
80
81 // Whether or not we should allow the URL to download.
Charlie Reis 2014/09/15 21:19:40 As noted before, what if it's not a download? (An
82 bool allow_download;
83
84 // Extra headers (separated by \n) to send during the request.
85 std::string extra_headers;
86
87 // If is_post is true, holds the post_data information from browser. Empty
88 // otherwise.
89 std::vector<unsigned char> browser_initiated_post_data;
90 };
91
92 } // namespace content
93
94 #endif // CONTENT_COMMON_NAVIGATION_PARAMS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698