summaryrefslogtreecommitdiffstats
path: root/chrome/browser/tab_contents
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/tab_contents')
-rw-r--r--chrome/browser/tab_contents/render_view_context_menu.cc11
-rw-r--r--chrome/browser/tab_contents/tab_contents.cc3
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;
}