summaryrefslogtreecommitdiffstats
path: root/content/common
diff options
context:
space:
mode:
authorcreis@chromium.org <creis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-24 22:33:18 +0000
committercreis@chromium.org <creis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-24 22:33:18 +0000
commitd142ccd2295cf9a67b5fb001d43ee0e9d01af45b (patch)
tree6fb23f37ce5b314b217359bd741f7fca749b6418 /content/common
parentde64b92b082ad3ac9af16e76fe9be0331a38a8a6 (diff)
downloadchromium_src-d142ccd2295cf9a67b5fb001d43ee0e9d01af45b.zip
chromium_src-d142ccd2295cf9a67b5fb001d43ee0e9d01af45b.tar.gz
chromium_src-d142ccd2295cf9a67b5fb001d43ee0e9d01af45b.tar.bz2
Revert 251563 "Move browser initiated navigation from RenderView..."
Speculatively revert to help diagnose bug 345757. Mainly useful to make it easier to revert r249676, which changes the lifetime of RenderViewHosts. > Move browser initiated navigation from RenderViewHost to RenderFrameHost. > > BUG=304341 > TBR=jochen@chromium.org > > Review URL: https://codereview.chromium.org/148083013 TBR=nasko@chromium.org Review URL: https://codereview.chromium.org/177713006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@253010 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/common')
-rw-r--r--content/common/frame_message_enums.h40
-rw-r--r--content/common/frame_messages.h99
-rw-r--r--content/common/view_message_enums.h27
-rw-r--r--content/common/view_messages.h97
4 files changed, 124 insertions, 139 deletions
diff --git a/content/common/frame_message_enums.h b/content/common/frame_message_enums.h
deleted file mode 100644
index d2f9d8a..0000000
--- a/content/common/frame_message_enums.h
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CONTENT_COMMON_FRAME_MESSAGES_ENUMS_H_
-#define CONTENT_COMMON_FRAME_MESSAGES_ENUMS_H_
-
-#include "ipc/ipc_message_macros.h"
-
-struct FrameMsg_Navigate_Type {
- public:
- enum Value {
- // Reload the page.
- RELOAD,
-
- // Reload the page, ignoring any cache entries.
- RELOAD_IGNORING_CACHE,
-
- // Reload the page using the original request URL.
- RELOAD_ORIGINAL_REQUEST_URL,
-
- // The navigation is the result of session restore and should honor the
- // page's cache policy while restoring form state. This is set to true if
- // restoring a tab/session from the previous session and the previous
- // session did not crash. If this is not set and the page was restored then
- // the page's cache policy is ignored and we load from the cache.
- RESTORE,
-
- // Like RESTORE, except that the navigation contains POST data.
- RESTORE_WITH_POST,
-
- // Navigation type not categorized by the other types.
- NORMAL,
-
- // Last guard value, so we can use it for validity checks.
- NAVIGATE_TYPE_LAST = NORMAL,
- };
-};
-
-#endif // CONTENT_COMMON_FRAME_MESSAGES_ENUMS_H_
diff --git a/content/common/frame_messages.h b/content/common/frame_messages.h
index 00bfd1a..e834476 100644
--- a/content/common/frame_messages.h
+++ b/content/common/frame_messages.h
@@ -7,7 +7,6 @@
#include "content/common/content_export.h"
#include "content/common/content_param_traits.h"
-#include "content/common/frame_message_enums.h"
#include "content/common/frame_param.h"
#include "content/common/navigation_gesture.h"
#include "content/public/common/common_param_traits.h"
@@ -22,8 +21,6 @@
#define IPC_MESSAGE_START FrameMsgStart
-IPC_ENUM_TRAITS_MAX_VALUE(FrameMsg_Navigate_Type::Value,
- FrameMsg_Navigate_Type::NAVIGATE_TYPE_LAST)
IPC_ENUM_TRAITS_MAX_VALUE(blink::WebContextMenuData::MediaType,
blink::WebContextMenuData::MediaTypeLast)
@@ -155,98 +152,6 @@ IPC_STRUCT_BEGIN_WITH_PARENT(FrameHostMsg_DidCommitProvisionalLoad_Params,
IPC_STRUCT_MEMBER(bool, history_list_was_cleared)
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)
-
- // Base URL for use in WebKit's SubstituteData.
- // Is only used with data: URLs.
- IPC_STRUCT_MEMBER(GURL, base_url_for_data_url)
-
- // History URL for use in WebKit's SubstituteData.
- // 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
- 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.
- // Unless this refers to a transferred navigation, these values are -1 and -1.
- 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 to JS for this navigation.
- IPC_STRUCT_MEMBER(base::TimeTicks, browser_navigation_start)
-IPC_STRUCT_END()
-
// -----------------------------------------------------------------------------
// Messages sent from the browser to the renderer.
@@ -283,10 +188,6 @@ IPC_MESSAGE_ROUTED2(FrameMsg_CustomContextMenuAction,
content::CustomContextMenuContext /* custom_context */,
unsigned /* action */)
-// Tells the renderer to perform the specified navigation, interrupting any
-// existing navigation.
-IPC_MESSAGE_ROUTED1(FrameMsg_Navigate, FrameMsg_Navigate_Params)
-
// Instructs the frame to swap out for a cross-site transition, including
// running the unload event handler. Expects a SwapOut_ACK message when
// finished.
diff --git a/content/common/view_message_enums.h b/content/common/view_message_enums.h
index 4bbd217..c8b3ed0 100644
--- a/content/common/view_message_enums.h
+++ b/content/common/view_message_enums.h
@@ -26,6 +26,33 @@ struct ViewHostMsg_UpdateRect_Flags {
}
};
+struct ViewMsg_Navigate_Type {
+ public:
+ enum Value {
+ // Reload the page.
+ RELOAD,
+
+ // Reload the page, ignoring any cache entries.
+ RELOAD_IGNORING_CACHE,
+
+ // Reload the page using the original request URL.
+ RELOAD_ORIGINAL_REQUEST_URL,
+
+ // The navigation is the result of session restore and should honor the
+ // page's cache policy while restoring form state. This is set to true if
+ // restoring a tab/session from the previous session and the previous
+ // session did not crash. If this is not set and the page was restored then
+ // the page's cache policy is ignored and we load from the cache.
+ RESTORE,
+
+ // Like RESTORE, except that the navigation contains POST data.
+ RESTORE_WITH_POST,
+
+ // Navigation type not categorized by the other types.
+ NORMAL
+ };
+};
+
// Note: keep enums in content/browser/resources/accessibility/accessibility.js
// in sync with these two enums.
enum AccessibilityModeFlag {
diff --git a/content/common/view_messages.h b/content/common/view_messages.h
index c7935d8..357c8ce 100644
--- a/content/common/view_messages.h
+++ b/content/common/view_messages.h
@@ -71,6 +71,7 @@
#define IPC_MESSAGE_START ViewMsgStart
IPC_ENUM_TRAITS(AccessibilityMode)
+IPC_ENUM_TRAITS(ViewMsg_Navigate_Type::Value)
IPC_ENUM_TRAITS(blink::WebMediaPlayerAction::Type)
IPC_ENUM_TRAITS(blink::WebPluginAction::Type)
IPC_ENUM_TRAITS(blink::WebPopupType)
@@ -477,6 +478,98 @@ IPC_STRUCT_BEGIN(ViewHostMsg_UpdateRect_Params)
IPC_STRUCT_MEMBER(std::vector<ui::LatencyInfo>, latency_info)
IPC_STRUCT_END()
+IPC_STRUCT_BEGIN(ViewMsg_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)
+
+ // Base URL for use in WebKit's SubstituteData.
+ // Is only used with data: URLs.
+ IPC_STRUCT_MEMBER(GURL, base_url_for_data_url)
+
+ // History URL for use in WebKit's SubstituteData.
+ // 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(ViewMsg_Navigate_Type::Value, navigation_type)
+
+ // The time the request was created
+ 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.
+ // Unless this refers to a transferred navigation, these values are -1 and -1.
+ 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 to JS for this navigation.
+ IPC_STRUCT_MEMBER(base::TimeTicks, browser_navigation_start)
+IPC_STRUCT_END()
+
IPC_STRUCT_BEGIN(ViewMsg_New_Params)
// Renderer-wide preferences.
IPC_STRUCT_MEMBER(content::RendererPreferences, renderer_preferences)
@@ -677,6 +770,10 @@ IPC_MESSAGE_ROUTED1(ViewMsg_SetInitialFocus,
IPC_MESSAGE_ROUTED1(ViewMsg_ShowContextMenu,
gfx::Point /* location where menu should be shown */)
+// Tells the renderer to perform the specified navigation, interrupting any
+// existing navigation.
+IPC_MESSAGE_ROUTED1(ViewMsg_Navigate, ViewMsg_Navigate_Params)
+
IPC_MESSAGE_ROUTED0(ViewMsg_Stop)
// Tells the renderer to reload the current focused frame