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

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

Issue 872473003: PlzNavigate: Remove the RequestNavigation IPC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed nits + fix compilation error Created 5 years, 10 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 <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 61
62 // Timestamp of the user input event that triggered this navigation. Empty if 62 // Timestamp of the user input event that triggered this navigation. Empty if
63 // the navigation was not triggered by clicking on a link or by receiving an 63 // the navigation was not triggered by clicking on a link or by receiving an
64 // intent on Android. 64 // intent on Android.
65 base::TimeTicks ui_timestamp; 65 base::TimeTicks ui_timestamp;
66 66
67 // The report type to be used when recording the metric using |ui_timestamp|. 67 // The report type to be used when recording the metric using |ui_timestamp|.
68 FrameMsg_UILoadMetricsReportType::Value report_type; 68 FrameMsg_UILoadMetricsReportType::Value report_type;
69 }; 69 };
70 70
71 // Used by FrameMsg_Navigate. 71 // PlzNavigate: parameters needed to start a navigation on the IO thread.
72 // PlzNavigate: sent to the renderer when requesting a navigation. 72 struct CONTENT_EXPORT BeginNavigationParams {
73 struct CONTENT_EXPORT RequestNavigationParams { 73 // TODO(clamy): See if it is possible to reuse this in
74 RequestNavigationParams(); 74 // ResourceMsg_Request_Params.
75 RequestNavigationParams(bool is_post, 75 BeginNavigationParams();
76 const std::string& extra_headers, 76 BeginNavigationParams(std::string method,
77 const base::RefCountedMemory* post_data); 77 std::string headers,
78 ~RequestNavigationParams(); 78 int load_flags,
79 bool has_user_gesture);
79 80
80 // Whether the navigation is a POST request (as opposed to a GET). 81 // The request method: GET, POST, etc.
81 bool is_post; 82 std::string method;
82 83
83 // Extra headers (separated by \n) to send during the request. 84 // Additional HTTP request headers.
84 std::string extra_headers; 85 std::string headers;
85 86
86 // If is_post is true, holds the post_data information from browser. Empty 87 // net::URLRequest load flags (net::LOAD_NORMAL) by default).
87 // otherwise. 88 int load_flags;
88 std::vector<unsigned char> browser_initiated_post_data; 89
90 // True if the request was user initiated.
91 bool has_user_gesture;
89 }; 92 };
90 93
91 // Used by FrameMsg_Navigate. 94 // Used by FrameMsg_Navigate.
92 // PlzNavigate: sent to the renderer when the navigation is ready to commit. 95 // PlzNavigate: sent to the renderer when the navigation is ready to commit.
93 struct CONTENT_EXPORT CommitNavigationParams { 96 struct CONTENT_EXPORT CommitNavigationParams {
94 CommitNavigationParams(); 97 CommitNavigationParams();
95 CommitNavigationParams(const PageState& page_state, 98 CommitNavigationParams(const PageState& page_state,
96 bool is_overriding_user_agent, 99 bool is_overriding_user_agent,
97 base::TimeTicks navigation_start); 100 base::TimeTicks navigation_start);
98 ~CommitNavigationParams(); 101 ~CommitNavigationParams();
99 102
100 // Opaque history state (received by ViewHostMsg_UpdateState). 103 // Opaque history state (received by ViewHostMsg_UpdateState).
101 PageState page_state; 104 PageState page_state;
102 105
103 // Whether or not the user agent override string should be used. 106 // Whether or not the user agent override string should be used.
104 bool is_overriding_user_agent; 107 bool is_overriding_user_agent;
105 108
106 // The navigationStart time to expose through the Navigation Timing API to JS. 109 // The navigationStart time to expose through the Navigation Timing API to JS.
107 base::TimeTicks browser_navigation_start; 110 base::TimeTicks browser_navigation_start;
108 111
109 // TODO(clamy): Move the redirect chain here. 112 // TODO(clamy): Move the redirect chain here.
110 }; 113 };
111 114
112 } // namespace content 115 } // namespace content
113 116
114 #endif // CONTENT_COMMON_NAVIGATION_PARAMS_H_ 117 #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