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

Side by Side Diff: content/renderer/render_view.cc

Issue 7624011: Keep normal popups opened from same-origin iframes in an extension process. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Switch to canRequest. Created 9 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/renderer/mock_content_renderer_client.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/render_view.h" 5 #include "content/renderer/render_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 2131 matching lines...) Expand 10 before | Expand all | Expand 10 after
2142 default_policy == WebKit::WebNavigationPolicyCurrentTab && 2142 default_policy == WebKit::WebNavigationPolicyCurrentTab &&
2143 request.httpMethod() == "GET" && !url.SchemeIs(chrome::kAboutScheme)) { 2143 request.httpMethod() == "GET" && !url.SchemeIs(chrome::kAboutScheme)) {
2144 bool send_referrer = false; 2144 bool send_referrer = false;
2145 bool should_fork = 2145 bool should_fork =
2146 BindingsPolicy::is_web_ui_enabled(enabled_bindings_) || 2146 BindingsPolicy::is_web_ui_enabled(enabled_bindings_) ||
2147 frame->isViewSourceModeEnabled() || 2147 frame->isViewSourceModeEnabled() ||
2148 url.SchemeIs(chrome::kViewSourceScheme); 2148 url.SchemeIs(chrome::kViewSourceScheme);
2149 2149
2150 if (!should_fork) { 2150 if (!should_fork) {
2151 // Give the embedder a chance. 2151 // Give the embedder a chance.
2152 bool is_initial_navigation = page_id_ == -1;
2152 should_fork = content::GetContentClient()->renderer()->ShouldFork( 2153 should_fork = content::GetContentClient()->renderer()->ShouldFork(
2153 frame, url, is_content_initiated, &send_referrer); 2154 frame, url, is_content_initiated, is_initial_navigation,
2155 &send_referrer);
2154 } 2156 }
2155 2157
2156 if (should_fork) { 2158 if (should_fork) {
2157 GURL referrer(request.httpHeaderField(WebString::fromUTF8("Referer"))); 2159 GURL referrer(request.httpHeaderField(WebString::fromUTF8("Referer")));
2158 OpenURL(url, send_referrer ? referrer : GURL(), default_policy); 2160 OpenURL(url, send_referrer ? referrer : GURL(), default_policy);
2159 return WebKit::WebNavigationPolicyIgnore; // Suppress the load here. 2161 return WebKit::WebNavigationPolicyIgnore; // Suppress the load here.
2160 } 2162 }
2161 } 2163 }
2162 2164
2163 // Detect when a page is "forking" a new tab that can be safely rendered in 2165 // Detect when a page is "forking" a new tab that can be safely rendered in
(...skipping 2367 matching lines...) Expand 10 before | Expand all | Expand 10 after
4531 } 4533 }
4532 #endif 4534 #endif
4533 4535
4534 void RenderView::OnContextMenuClosed( 4536 void RenderView::OnContextMenuClosed(
4535 const webkit_glue::CustomContextMenuContext& custom_context) { 4537 const webkit_glue::CustomContextMenuContext& custom_context) {
4536 if (custom_context.is_pepper_menu) 4538 if (custom_context.is_pepper_menu)
4537 pepper_delegate_.OnContextMenuClosed(custom_context); 4539 pepper_delegate_.OnContextMenuClosed(custom_context);
4538 else 4540 else
4539 context_menu_node_.reset(); 4541 context_menu_node_.reset();
4540 } 4542 }
OLDNEW
« no previous file with comments | « content/renderer/mock_content_renderer_client.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698