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

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

Issue 1374053002: Remove AboutToNavigateRenderFrame, issue custom notification for DevTools. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased, win test fix Created 5 years, 3 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_impl.cc
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
index 488fad6ac2f16a5c604f863a188a6f637b7552a6..9b06ff0fabdef6122f5ba0d60bbd022b166676ca 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -17,6 +17,7 @@
#include "content/browser/accessibility/browser_accessibility_state_impl.h"
#include "content/browser/bad_message.h"
#include "content/browser/child_process_security_policy_impl.h"
+#include "content/browser/devtools/render_frame_devtools_agent_host.h"
#include "content/browser/frame_host/cross_process_frame_connector.h"
#include "content/browser/frame_host/cross_site_transferring_request.h"
#include "content/browser/frame_host/frame_mojo_shell.h"
@@ -1705,9 +1706,7 @@ void RenderFrameHostImpl::Navigate(
// Get back to a clean state, in case we start a new navigation without
// completing a RFH swap or unload handler.
SetState(RenderFrameHostImpl::STATE_DEFAULT);
-
- Send(new FrameMsg_Navigate(routing_id_, common_params, start_params,
- request_params));
+ SendNavigateMessage(common_params, start_params, request_params);
}
// Force the throbber to start. This is done because Blink's "started loading"
@@ -2110,10 +2109,9 @@ void RenderFrameHostImpl::SetNavigationsSuspended(
DCHECK(!proceed_time.is_null());
suspended_nav_params_->request_params.browser_navigation_start =
proceed_time;
- Send(new FrameMsg_Navigate(routing_id_,
- suspended_nav_params_->common_params,
- suspended_nav_params_->start_params,
- suspended_nav_params_->request_params));
+ SendNavigateMessage(suspended_nav_params_->common_params,
+ suspended_nav_params_->start_params,
+ suspended_nav_params_->request_params);
suspended_nav_params_.reset();
}
}
@@ -2128,6 +2126,16 @@ void RenderFrameHostImpl::CancelSuspendedNavigations() {
navigations_suspended_ = false;
}
+void RenderFrameHostImpl::SendNavigateMessage(
+ const CommonNavigationParams& common_params,
+ const StartNavigationParams& start_params,
+ const RequestNavigationParams& request_params) {
+ RenderFrameDevToolsAgentHost::OnBeforeNavigation(
+ frame_tree_node_->current_frame_host(), this);
+ Send(new FrameMsg_Navigate(
+ routing_id_, common_params, start_params, request_params));
+}
+
void RenderFrameHostImpl::DidUseGeolocationPermission() {
PermissionManager* permission_manager =
GetSiteInstance()->GetBrowserContext()->GetPermissionManager();
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.h ('k') | content/browser/web_contents/web_contents_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698