Index: content/common/frame_messages.h |
diff --git a/content/common/frame_messages.h b/content/common/frame_messages.h |
index d70ea5d6935f1628e7030645f9800481b5ad28ce..78ae46ff164f3e5cf5f5ed772f61ce768620ff17 100644 |
--- a/content/common/frame_messages.h |
+++ b/content/common/frame_messages.h |
@@ -10,6 +10,7 @@ |
#include "content/common/frame_message_enums.h" |
#include "content/common/frame_param.h" |
#include "content/common/navigation_gesture.h" |
+#include "content/common/navigation_params.h" |
#include "content/common/resource_request_body.h" |
#include "content/public/common/color_suggestion.h" |
#include "content/public/common/common_param_traits.h" |
@@ -80,6 +81,31 @@ IPC_STRUCT_TRAITS_BEGIN(content::ContextMenuParams) |
#endif |
IPC_STRUCT_TRAITS_END() |
+IPC_STRUCT_TRAITS_BEGIN(content::NavigationParamsWithRequestAndCommitInfo) |
+ IPC_STRUCT_TRAITS_PARENT(content::NavigationParamsWithCommitInfo) |
+ IPC_STRUCT_TRAITS_MEMBER(is_post) |
+ IPC_STRUCT_TRAITS_MEMBER(allow_download) |
+IPC_STRUCT_TRAITS_END() |
+ |
+IPC_STRUCT_TRAITS_BEGIN(content::NavigationParamsWithCommitInfo) |
+ IPC_STRUCT_TRAITS_PARENT(content::CoreNavigationParams) |
+ IPC_STRUCT_TRAITS_MEMBER(page_id) |
+ IPC_STRUCT_TRAITS_MEMBER(should_clear_history_list) |
+ IPC_STRUCT_TRAITS_MEMBER(pending_history_list_offset) |
+ IPC_STRUCT_TRAITS_MEMBER(current_history_list_offset) |
+ IPC_STRUCT_TRAITS_MEMBER(current_history_list_length) |
+ IPC_STRUCT_TRAITS_MEMBER(page_state) |
+ IPC_STRUCT_TRAITS_MEMBER(navigation_type) |
+ IPC_STRUCT_TRAITS_MEMBER(is_overriding_user_agent) |
+ IPC_STRUCT_TRAITS_MEMBER(browser_navigation_start) |
+IPC_STRUCT_TRAITS_END() |
+ |
+IPC_STRUCT_TRAITS_BEGIN(content::CoreNavigationParams) |
Charlie Reis
2014/09/15 21:19:40
Why are these defined in reverse order? Is that a
|
+ IPC_STRUCT_TRAITS_MEMBER(url) |
+ IPC_STRUCT_TRAITS_MEMBER(referrer) |
+ IPC_STRUCT_TRAITS_MEMBER(transition) |
+IPC_STRUCT_TRAITS_END() |
+ |
IPC_STRUCT_TRAITS_BEGIN(content::CustomContextMenuContext) |
IPC_STRUCT_TRAITS_MEMBER(is_pepper_menu) |
IPC_STRUCT_TRAITS_MEMBER(request_id) |
@@ -169,31 +195,9 @@ IPC_STRUCT_BEGIN_WITH_PARENT(FrameHostMsg_DidCommitProvisionalLoad_Params, |
IPC_STRUCT_MEMBER(int, render_view_routing_id) |
IPC_STRUCT_END() |
-IPC_STRUCT_BEGIN(FrameMsg_Navigate_Params) |
- // 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 |
- // FrameHostMsg_DidCommitProvisionalLoad message. |
- IPC_STRUCT_MEMBER(int32, page_id) |
- |
- // If page_id is -1, then pending_history_list_offset will also be -1. |
- // Otherwise, it contains the offset into the history list corresponding to |
- // the current navigation. |
- IPC_STRUCT_MEMBER(int, pending_history_list_offset) |
- |
- // Informs the RenderView of where its current page contents reside in |
- // session history and the total size of the session history list. |
- IPC_STRUCT_MEMBER(int, current_history_list_offset) |
- IPC_STRUCT_MEMBER(int, current_history_list_length) |
- |
- // Informs the RenderView the session history should be cleared. In that |
- // case, the RenderView needs to notify the browser that the clearing was |
- // succesful when the navigation commits. |
- IPC_STRUCT_MEMBER(bool, should_clear_history_list) |
- |
- // The URL to load. |
- IPC_STRUCT_MEMBER(GURL, url) |
- |
+IPC_STRUCT_BEGIN_WITH_PARENT(FrameMsg_Navigate_Params, |
+ content::NavigationParamsWithRequestAndCommitInfo) |
+ IPC_STRUCT_TRAITS_PARENT(content::NavigationParamsWithRequestAndCommitInfo) |
// Base URL for use in WebKit's SubstituteData. |
// Is only used with data: URLs. |
IPC_STRUCT_MEMBER(GURL, base_url_for_data_url) |
Charlie Reis
2014/09/15 21:19:40
Are the rest of these going to get migrated to the
|
@@ -202,36 +206,20 @@ IPC_STRUCT_BEGIN(FrameMsg_Navigate_Params) |
// Is only used with data: URLs. |
IPC_STRUCT_MEMBER(GURL, history_url_for_data_url) |
- // The URL to send in the "Referer" header field. Can be empty if there is |
- // no referrer. |
- IPC_STRUCT_MEMBER(content::Referrer, referrer) |
- |
// Any redirect URLs that occurred before |url|. Useful for cross-process |
// navigations; defaults to empty. |
IPC_STRUCT_MEMBER(std::vector<GURL>, redirects) |
- // The type of transition. |
- IPC_STRUCT_MEMBER(content::PageTransition, transition) |
- |
// Informs the RenderView the pending navigation should replace the current |
// history entry when it commits. This is used for cross-process redirects so |
// the transferred navigation can recover the navigation state. |
IPC_STRUCT_MEMBER(bool, should_replace_current_entry) |
- // Opaque history state (received by ViewHostMsg_UpdateState). |
- IPC_STRUCT_MEMBER(content::PageState, page_state) |
- |
- // Type of navigation. |
- IPC_STRUCT_MEMBER(FrameMsg_Navigate_Type::Value, navigation_type) |
- |
// The time the request was created. This is used by the old performance |
// infrastructure to set up DocumentState associated with the RenderView. |
// TODO(ppi): make it go away. |
IPC_STRUCT_MEMBER(base::Time, request_time) |
- // Extra headers (separated by \n) to send during the request. |
- IPC_STRUCT_MEMBER(std::string, extra_headers) |
- |
// The following two members identify a previous request that has been |
// created before this navigation is being transferred to a new render view. |
// This serves the purpose of recycling the old request. |
@@ -239,28 +227,12 @@ IPC_STRUCT_BEGIN(FrameMsg_Navigate_Params) |
IPC_STRUCT_MEMBER(int, transferred_request_child_id) |
IPC_STRUCT_MEMBER(int, transferred_request_request_id) |
- // Whether or not we should allow the url to download. |
- IPC_STRUCT_MEMBER(bool, allow_download) |
- |
- // Whether or not the user agent override string should be used. |
- IPC_STRUCT_MEMBER(bool, is_overriding_user_agent) |
- |
- // True if this was a post request. |
- IPC_STRUCT_MEMBER(bool, is_post) |
- |
- // 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) |
- |
// Whether or not this url should be allowed to access local file:// |
// resources. |
IPC_STRUCT_MEMBER(bool, can_load_local_resources) |
// If not empty, which frame to navigate. |
IPC_STRUCT_MEMBER(std::string, frame_to_navigate) |
- |
- // The navigationStart time to expose through the Navigation Timing API to JS. |
- IPC_STRUCT_MEMBER(base::TimeTicks, browser_navigation_start) |
IPC_STRUCT_END() |
IPC_STRUCT_BEGIN(FrameHostMsg_OpenURL_Params) |
@@ -272,16 +244,12 @@ IPC_STRUCT_BEGIN(FrameHostMsg_OpenURL_Params) |
IPC_STRUCT_END() |
// PlzNavigate |
-IPC_STRUCT_BEGIN(FrameHostMsg_BeginNavigation_Params) |
+IPC_STRUCT_BEGIN_WITH_PARENT(FrameHostMsg_BeginNavigation_Params, |
+ content::CoreNavigationParams) |
+ IPC_STRUCT_TRAITS_PARENT(content::CoreNavigationParams) |
// The request method: GET, POST, etc. |
IPC_STRUCT_MEMBER(std::string, method) |
Charlie Reis
2014/09/15 21:19:40
Same question.
|
- // The requested URL. |
- IPC_STRUCT_MEMBER(GURL, url) |
- |
- // The referrer to use (may be empty). |
- IPC_STRUCT_MEMBER(content::Referrer, referrer) |
- |
// Additional HTTP request headers. |
IPC_STRUCT_MEMBER(std::string, headers) |
@@ -294,15 +262,15 @@ IPC_STRUCT_BEGIN(FrameHostMsg_BeginNavigation_Params) |
// True if the request was user initiated. |
IPC_STRUCT_MEMBER(bool, has_user_gesture) |
+IPC_STRUCT_END() |
- IPC_STRUCT_MEMBER(content::PageTransition, transition_type) |
- |
- // Whether this navigation should replace the current session history entry on |
- // commit. |
- IPC_STRUCT_MEMBER(bool, should_replace_current_entry) |
- |
- // Whether or not we should allow the URL to download. |
- IPC_STRUCT_MEMBER(bool, allow_download) |
+// PlzNavigate |
+IPC_STRUCT_BEGIN_WITH_PARENT(FrameMsg_CommitNavigation_Params, |
+ content::NavigationParamsWithCommitInfo) |
+ IPC_STRUCT_TRAITS_PARENT(content::NavigationParamsWithCommitInfo) |
+ // The URL to request to the browser to get access to the stream of data. |
+ IPC_STRUCT_MEMBER(GURL, stream_url) |
+ // TODO(clamy): Add timing values relevant to the Navigation Timing API. |
IPC_STRUCT_END() |
#if defined(OS_MACOSX) || defined(OS_ANDROID) |
@@ -488,6 +456,10 @@ IPC_MESSAGE_ROUTED1(FrameMsg_SelectPopupMenuItem, |
#endif |
+// PlzNavigate |
+// Tells the renderer that a navigation is ready to commit. |
+IPC_MESSAGE_ROUTED1(FrameMsg_CommitNavigation, FrameMsg_CommitNavigation_Params) |
+ |
// ----------------------------------------------------------------------------- |
// Messages sent from the renderer to the browser. |
@@ -760,6 +732,7 @@ IPC_MESSAGE_CONTROL4(FrameHostMsg_AddNavigationTransitionData, |
std::string /* selector */, |
std::string /* markup */) |
+// PlzNavigate |
// Tells the browser to perform a navigation. |
IPC_MESSAGE_ROUTED1(FrameHostMsg_BeginNavigation, |
FrameHostMsg_BeginNavigation_Params) |