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

Unified Diff: content/renderer/render_view_impl.cc

Issue 12531004: Let the browser handle external navigations from DevTools. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_view_impl.cc
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index be1a15187fc06219c61d91c2cdb837cfbed8d3c1..3cb02ac0dd3a0ccef507d164a6a63d780c91f1a5 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -3043,6 +3043,8 @@ WebNavigationPolicy RenderViewImpl::decidePolicyForNavigation(
// Similarly, navigations to view-source URLs or within ViewSource mode
// must be handled by the browser process (except for reloads - those are
// safe to leave within the renderer).
+ // Also navigations from devtools URLs must be handled by the browser
+ // process.
// Lastly, access to file:// URLs from non-file:// URL pages must be
// handled by the browser so that ordinary renderer processes don't get
// blessed with file permissions.
@@ -3052,7 +3054,8 @@ WebNavigationPolicy RenderViewImpl::decidePolicyForNavigation(
(cumulative_bindings & BINDINGS_POLICY_WEB_UI) ||
url.SchemeIs(chrome::kViewSourceScheme) ||
(frame->isViewSourceModeEnabled() &&
- type != WebKit::WebNavigationTypeReload);
+ type != WebKit::WebNavigationTypeReload) ||
+ old_url.SchemeIs(chrome::kChromeDevToolsScheme);
pfeldman 2013/03/06 14:00:35 Charlie: can we do HasWebUIScheme(old_url) instead
Charlie Reis 2013/03/06 18:18:25 This seems ok, because it's broader than before.
if (!should_fork && url.SchemeIs(chrome::kFileScheme)) {
// Fork non-file to file opens. Check the opener URL if this is the
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698