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

Unified Diff: chrome/browser/tab_contents/render_view_context_menu.cc

Issue 174162: Don't show "Inspect Element" in the context menu if we can't inspect. (Closed)
Patch Set: ... Created 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/gtk/standard_menus.cc ('k') | chrome/browser/views/toolbar_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/tab_contents/render_view_context_menu.cc
diff --git a/chrome/browser/tab_contents/render_view_context_menu.cc b/chrome/browser/tab_contents/render_view_context_menu.cc
index ac1fb8d7d919bd8d7415763d0f56c981189328fe..2f9522d8450013a6d62f201292a2e738310fe19d 100644
--- a/chrome/browser/tab_contents/render_view_context_menu.cc
+++ b/chrome/browser/tab_contents/render_view_context_menu.cc
@@ -82,12 +82,15 @@ void RenderViewContextMenu::InitMenu(ContextNodeType node_type,
if (node_type.type & ContextNodeType::SELECTION)
AppendSearchProvider();
- AppendSeparator();
+
AppendDeveloperItems();
}
void RenderViewContextMenu::AppendDeveloperItems() {
- AppendMenuItem(IDS_CONTENT_CONTEXT_INSPECTELEMENT);
+ if (g_browser_process->have_inspector_files()) {
+ AppendSeparator();
+ AppendMenuItem(IDS_CONTENT_CONTEXT_INSPECTELEMENT);
+ }
}
void RenderViewContextMenu::AppendLinkItems() {
« no previous file with comments | « chrome/browser/gtk/standard_menus.cc ('k') | chrome/browser/views/toolbar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698