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

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: Created 5 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 <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 // Used by FrameMsg_Navigate.
72 // PlzNavigate: sent to the renderer when requesting a navigation.
73 struct CONTENT_EXPORT RequestNavigationParams { 72 struct CONTENT_EXPORT RequestNavigationParams {
nasko 2015/02/02 21:17:43 Do we still need this struct if we have removed th
clamy 2015/02/03 16:17:10 Done.
74 RequestNavigationParams(); 73 RequestNavigationParams();
75 RequestNavigationParams(bool is_post, 74 RequestNavigationParams(bool is_post,
76 const std::string& extra_headers, 75 const std::string& extra_headers,
77 const base::RefCountedMemory* post_data); 76 const base::RefCountedMemory* post_data);
78 ~RequestNavigationParams(); 77 ~RequestNavigationParams();
79 78
80 // Whether the navigation is a POST request (as opposed to a GET). 79 // Whether the navigation is a POST request (as opposed to a GET).
81 bool is_post; 80 bool is_post;
82 81
83 // Extra headers (separated by \n) to send during the request. 82 // Extra headers (separated by \n) to send during the request.
84 std::string extra_headers; 83 std::string extra_headers;
85 84
86 // If is_post is true, holds the post_data information from browser. Empty 85 // If is_post is true, holds the post_data information from browser. Empty
87 // otherwise. 86 // otherwise.
88 std::vector<unsigned char> browser_initiated_post_data; 87 std::vector<unsigned char> browser_initiated_post_data;
89 }; 88 };
90 89
90 // PlzNavigate: parameters needed to start a navigation on the IO thread.
91 struct CONTENT_EXPORT BeginNavigationParams {
92 // TODO(clamy): See if it is possible to reuse this in
93 // ResourceMsg_Request_Params.
94 BeginNavigationParams();
nasko 2015/02/02 21:17:43 Should we allow a parameterless constructor? The c
clamy 2015/02/03 16:17:10 Actually it seems we need one to pass this struct
95 BeginNavigationParams(std::string method,
96 std::string headers,
97 int load_flags,
98 bool has_user_gesture);
99
100 // The request method: GET, POST, etc.
101 std::string method;
102
103 // Additional HTTP request headers.
104 std::string headers;
105
106 // net::URLRequest load flags (net::LOAD_NORMAL) by default).
107 int load_flags;
108
109 // True if the request was user initiated.
110 bool has_user_gesture;
111 };
112
91 // Used by FrameMsg_Navigate. 113 // Used by FrameMsg_Navigate.
92 // PlzNavigate: sent to the renderer when the navigation is ready to commit. 114 // PlzNavigate: sent to the renderer when the navigation is ready to commit.
93 struct CONTENT_EXPORT CommitNavigationParams { 115 struct CONTENT_EXPORT CommitNavigationParams {
94 CommitNavigationParams(); 116 CommitNavigationParams();
95 CommitNavigationParams(const PageState& page_state, 117 CommitNavigationParams(const PageState& page_state,
96 bool is_overriding_user_agent, 118 bool is_overriding_user_agent,
97 base::TimeTicks navigation_start); 119 base::TimeTicks navigation_start);
98 ~CommitNavigationParams(); 120 ~CommitNavigationParams();
99 121
100 // Opaque history state (received by ViewHostMsg_UpdateState). 122 // Opaque history state (received by ViewHostMsg_UpdateState).
101 PageState page_state; 123 PageState page_state;
102 124
103 // Whether or not the user agent override string should be used. 125 // Whether or not the user agent override string should be used.
104 bool is_overriding_user_agent; 126 bool is_overriding_user_agent;
105 127
106 // The navigationStart time to expose through the Navigation Timing API to JS. 128 // The navigationStart time to expose through the Navigation Timing API to JS.
107 base::TimeTicks browser_navigation_start; 129 base::TimeTicks browser_navigation_start;
108 130
109 // TODO(clamy): Move the redirect chain here. 131 // TODO(clamy): Move the redirect chain here.
110 }; 132 };
111 133
112 } // namespace content 134 } // namespace content
113 135
114 #endif // CONTENT_COMMON_NAVIGATION_PARAMS_H_ 136 #endif // CONTENT_COMMON_NAVIGATION_PARAMS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698