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

Unified Diff: content/common/frame_messages.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/loader/resource_dispatcher_host_impl.cc ('k') | content/common/navigation_params.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/frame_messages.h
diff --git a/content/common/frame_messages.h b/content/common/frame_messages.h
index d22c70433769600ce17cc992fc158cb76d3070e9..d3abd761cbd9d519ad7aecbcb3ceeec46f30b92d 100644
--- a/content/common/frame_messages.h
+++ b/content/common/frame_messages.h
@@ -214,10 +214,11 @@ IPC_STRUCT_TRAITS_BEGIN(content::CommonNavigationParams)
IPC_STRUCT_TRAITS_MEMBER(report_type)
IPC_STRUCT_TRAITS_END()
-IPC_STRUCT_TRAITS_BEGIN(content::RequestNavigationParams)
- IPC_STRUCT_TRAITS_MEMBER(is_post)
- IPC_STRUCT_TRAITS_MEMBER(extra_headers)
- IPC_STRUCT_TRAITS_MEMBER(browser_initiated_post_data)
+IPC_STRUCT_TRAITS_BEGIN(content::BeginNavigationParams)
+ IPC_STRUCT_TRAITS_MEMBER(method)
+ IPC_STRUCT_TRAITS_MEMBER(headers)
+ IPC_STRUCT_TRAITS_MEMBER(load_flags)
+ IPC_STRUCT_TRAITS_MEMBER(has_user_gesture)
IPC_STRUCT_TRAITS_END()
IPC_STRUCT_TRAITS_BEGIN(content::CommitNavigationParams)
@@ -251,9 +252,18 @@ IPC_STRUCT_BEGIN(FrameMsg_Navigate_Params)
// These structs contain parameters shared by other navigation IPCs.
IPC_STRUCT_MEMBER(content::CommonNavigationParams, common_params)
- IPC_STRUCT_MEMBER(content::RequestNavigationParams, request_params)
IPC_STRUCT_MEMBER(content::CommitNavigationParams, commit_params)
+ // Whether the navigation is a POST request (as opposed to a GET).
+ IPC_STRUCT_MEMBER(bool, is_post)
+
+ // Extra headers (separated by \n) to send during the request.
+ IPC_STRUCT_MEMBER(std::string, extra_headers)
+
+ // If is_post is true, holds the post_data information from browser. Empty
+ // otherwise.
+ IPC_STRUCT_MEMBER(std::vector<unsigned char>, browser_initiated_post_data)
+
// The page_id for this navigation, or -1 if it is a new navigation. Back,
// Forward, and Reload navigations should have a valid page_id. If the load
// succeeds, then this page_id will be reflected in the resultant
@@ -319,28 +329,6 @@ IPC_STRUCT_BEGIN(FrameHostMsg_OpenURL_Params)
IPC_STRUCT_MEMBER(bool, user_gesture)
IPC_STRUCT_END()
-// PlzNavigate
-IPC_STRUCT_BEGIN(FrameHostMsg_BeginNavigation_Params)
- // TODO(clamy): See if it is possible to define a common struct between this
- // IPC and ResourceMsg_Request_Params.
-
- // The request method: GET, POST, etc.
- IPC_STRUCT_MEMBER(std::string, method)
-
- // Additional HTTP request headers.
- IPC_STRUCT_MEMBER(std::string, headers)
-
- // net::URLRequest load flags (net::LOAD_NORMAL) by default).
- IPC_STRUCT_MEMBER(int, load_flags)
-
- // Optional resource request body (may be null).
- IPC_STRUCT_MEMBER(scoped_refptr<content::ResourceRequestBody>,
- request_body)
-
- // True if the request was user initiated.
- IPC_STRUCT_MEMBER(bool, has_user_gesture)
-IPC_STRUCT_END()
-
#if defined(OS_MACOSX) || defined(OS_ANDROID)
// This message is used for supporting popup menus on Mac OS X and Android using
// native controls. See the FrameHostMsg_ShowPopup message.
@@ -545,12 +533,6 @@ IPC_MESSAGE_ROUTED1(FrameMsg_SelectPopupMenuItem,
#endif
// PlzNavigate
-// Tells the renderer that a navigation has been requested.
-IPC_MESSAGE_ROUTED2(FrameMsg_RequestNavigation,
- content::CommonNavigationParams, /* common_params */
- content::RequestNavigationParams /* request_params */)
-
-// PlzNavigate
// Tells the renderer that a navigation is ready to commit. The renderer should
// request |stream_url| to get access to the stream containing the body of the
// response.
@@ -844,9 +826,10 @@ IPC_MESSAGE_CONTROL1(FrameHostMsg_AddNavigationTransitionData,
// PlzNavigate
// Tells the browser to perform a navigation.
-IPC_MESSAGE_ROUTED2(FrameHostMsg_BeginNavigation,
- FrameHostMsg_BeginNavigation_Params,
- content::CommonNavigationParams)
+IPC_MESSAGE_ROUTED3(FrameHostMsg_BeginNavigation,
+ content::CommonNavigationParams,
+ content::BeginNavigationParams,
+ scoped_refptr<content::ResourceRequestBody>)
// Sent once a paint happens after the first non empty layout. In other words
// after the frame has painted something.
« no previous file with comments | « content/browser/loader/resource_dispatcher_host_impl.cc ('k') | content/common/navigation_params.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698