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

Unified Diff: content/browser/frame_host/render_frame_host_manager.cc

Issue 367653002: Add a FrameHostMsg_BeginNavigation IPC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added unit test + fixed bug in parent_is_render_frame_computation Created 6 years, 5 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
Index: content/browser/frame_host/render_frame_host_manager.cc
diff --git a/content/browser/frame_host/render_frame_host_manager.cc b/content/browser/frame_host/render_frame_host_manager.cc
index 0321d7b9a334ba7d80a0ee2fe1bd331a9cf4fe9b..ad1d261ea9195bc9a80ca48bde677cb8ddc1e332 100644
--- a/content/browser/frame_host/render_frame_host_manager.cc
+++ b/content/browser/frame_host/render_frame_host_manager.cc
@@ -17,6 +17,8 @@
#include "content/browser/frame_host/interstitial_page_impl.h"
#include "content/browser/frame_host/navigation_controller_impl.h"
#include "content/browser/frame_host/navigation_entry_impl.h"
+#include "content/browser/frame_host/navigation_request.h"
+#include "content/browser/frame_host/navigation_request_info.h"
#include "content/browser/frame_host/navigator.h"
#include "content/browser/frame_host/render_frame_host_factory.h"
#include "content/browser/frame_host/render_frame_host_impl.h"
@@ -27,6 +29,7 @@
#include "content/browser/site_instance_impl.h"
#include "content/browser/webui/web_ui_controller_factory_registry.h"
#include "content/browser/webui/web_ui_impl.h"
+#include "content/common/frame_messages.h"
#include "content/common/view_messages.h"
#include "content/public/browser/content_browser_client.h"
#include "content/public/browser/notification_service.h"
@@ -567,6 +570,23 @@ void RenderFrameHostManager::ResetProxyHosts() {
STLDeleteValues(&proxy_hosts_);
}
+void RenderFrameHostManager::BeginNavigation(
+ const FrameHostMsg_BeginNavigation_Params& params) {
+ NavigationRequestInfo info(params);
+ FrameTreeNode* node = render_frame_host_->frame_tree_node();
nasko 2014/07/07 11:35:08 RFHM has the frame_tree_node_ as private member, n
clamy 2014/07/07 13:36:23 Done.
+
+ info.first_party_for_cookies = node->IsMainFrame() ?
+ params.url : node->frame_tree()->root()->current_url();
+ info.is_main_frame = node->IsMainFrame();
+ info.parent_is_main_frame = !node->parent() ?
+ false : node->parent()->IsMainFrame();
+ info.is_showing = GetRenderWidgetHostView()->IsShowing();
+
+ navigation_request_.reset(
+ new NavigationRequest(info, node->frame_tree_node_id()));
+ navigation_request_->BeginNavigation(params.request_body);
+}
+
void RenderFrameHostManager::Observe(
int type,
const NotificationSource& source,

Powered by Google App Engine
This is Rietveld 408576698