diff options
author | podivilov@chromium.org <podivilov@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-22 09:28:43 +0000 |
---|---|---|
committer | podivilov@chromium.org <podivilov@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-22 09:28:43 +0000 |
commit | 27c790d4c60ac6a2f7ca445e7946884c450f1c53 (patch) | |
tree | 0620d3b15d510bb35c71fd5c3896d6c69515e7d1 /chrome/browser/tab_contents | |
parent | 0192f41151d4d34576da444f1d7d1e1fded4f648 (diff) | |
download | chromium_src-27c790d4c60ac6a2f7ca445e7946884c450f1c53.zip chromium_src-27c790d4c60ac6a2f7ca445e7946884c450f1c53.tar.gz chromium_src-27c790d4c60ac6a2f7ca445e7946884c450f1c53.tar.bz2 |
Move inspector to "chrome-devtools" scheme
Pages with "chrome" scheme have very narrow permissions (e.g. no access to localStorage). We want inspector page to have the same permissions as usual page.
Review URL: http://codereview.chromium.org/3838005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63495 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_contents')
-rw-r--r-- | chrome/browser/tab_contents/render_view_context_menu.cc | 11 | ||||
-rw-r--r-- | chrome/browser/tab_contents/tab_contents.cc | 3 |
2 files changed, 4 insertions, 10 deletions
diff --git a/chrome/browser/tab_contents/render_view_context_menu.cc b/chrome/browser/tab_contents/render_view_context_menu.cc index 4dc7b11..68041ec 100644 --- a/chrome/browser/tab_contents/render_view_context_menu.cc +++ b/chrome/browser/tab_contents/render_view_context_menu.cc @@ -64,8 +64,7 @@ const size_t RenderViewContextMenu::kMaxSelectionTextLength = 50; // static bool RenderViewContextMenu::IsDevToolsURL(const GURL& url) { - return url.SchemeIs(chrome::kChromeUIScheme) && - url.host() == chrome::kChromeUIDevToolsHost; + return url.SchemeIs(chrome::kChromeDevToolsScheme); } // static @@ -1407,8 +1406,7 @@ bool RenderViewContextMenu::IsDevCommandEnabled(int id) const { bool debug_mode = true; #endif // Don't inspect new tab UI, etc. - if (active_entry->url().SchemeIs(chrome::kChromeUIScheme) && !debug_mode && - active_entry->url().host() != chrome::kChromeUIDevToolsHost) + if (active_entry->url().SchemeIs(chrome::kChromeUIScheme) && !debug_mode) return false; // Don't inspect about:network, about:memory, etc. @@ -1423,11 +1421,6 @@ bool RenderViewContextMenu::IsDevCommandEnabled(int id) const { if (!profile_->GetPrefs()->GetBoolean(prefs::kWebKitJavascriptEnabled) || command_line.HasSwitch(switches::kDisableJavaScript)) return false; - // Don't enable the web inspector on web inspector if there is no process - // per tab flag set. - if (IsDevToolsURL(active_entry->url()) && - !command_line.HasSwitch(switches::kProcessPerTab)) - return false; } return true; diff --git a/chrome/browser/tab_contents/tab_contents.cc b/chrome/browser/tab_contents/tab_contents.cc index eb6f1c0..c7e68ea 100644 --- a/chrome/browser/tab_contents/tab_contents.cc +++ b/chrome/browser/tab_contents/tab_contents.cc @@ -2878,7 +2878,8 @@ WebPreferences TabContents::GetWebkitPrefs() { // Force accelerated compositing and 2d canvas off for chrome: and // chrome-extension: pages. - if (GetURL().SchemeIs(chrome::kChromeUIScheme)) { + if (GetURL().SchemeIs(chrome::kChromeDevToolsScheme) || + GetURL().SchemeIs(chrome::kChromeUIScheme)) { web_prefs.accelerated_compositing_enabled = false; web_prefs.accelerated_2d_canvas_enabled = false; } |