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

Unified Diff: content/browser/renderer_host/render_view_host_impl.cc

Issue 9978015: Make browser_handles_top_level_requests synchronous. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ExternalTabContainer::ShouldIgnoreNavigation returns true if is_content_initiated Created 8 years, 8 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/renderer_host/render_view_host_impl.h ('k') | content/browser/tab_contents/tab_contents.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_view_host_impl.cc
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
index e31de0f182530c5e9c400978464681233c61a479..9c6080368ae92768758eba5278d8ac1c1961a886 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -828,6 +828,8 @@ bool RenderViewHostImpl::OnMessageReceived(const IPC::Message& msg) {
IPC_MESSAGE_HANDLER(ViewHostMsg_ToggleFullscreen,
OnMsgToggleFullscreen)
IPC_MESSAGE_HANDLER(ViewHostMsg_OpenURL, OnMsgOpenURL)
+ IPC_MESSAGE_HANDLER(ViewHostMsg_ShouldIgnoreNavigation,
+ OnMsgShouldIgnoreNavigation)
IPC_MESSAGE_HANDLER(ViewHostMsg_DidContentsPreferredSizeChange,
OnMsgDidContentsPreferredSizeChange)
IPC_MESSAGE_HANDLER(ViewHostMsg_DidChangeScrollbarsForMainFrame,
@@ -1160,6 +1162,21 @@ void RenderViewHostImpl::OnMsgOpenURL(const GURL& url,
validated_url, referrer, disposition, source_frame_id);
}
darin (slow to review) 2012/04/16 15:47:11 This creates a dead-lock. It is not valid to hand
mkosiba (inactive) 2012/04/16 16:15:08 Is is a guaranteed deadlock or only under certain
+void RenderViewHostImpl::OnMsgShouldIgnoreNavigation(
+ const GURL& url,
+ const content::Referrer& referrer,
+ WindowOpenDisposition disposition,
+ int64 source_frame_id,
+ bool is_content_initiated,
+ bool* result) {
+ GURL validated_url(url);
+ FilterURL(ChildProcessSecurityPolicyImpl::GetInstance(),
+ GetProcess()->GetID(), false, &validated_url);
+ *result = delegate_->ShouldIgnoreNavigation(validated_url, referrer,
+ disposition, source_frame_id,
+ is_content_initiated);
+}
+
void RenderViewHostImpl::OnMsgDidContentsPreferredSizeChange(
const gfx::Size& new_size) {
delegate_->UpdatePreferredSize(new_size);
« no previous file with comments | « content/browser/renderer_host/render_view_host_impl.h ('k') | content/browser/tab_contents/tab_contents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698