summaryrefslogtreecommitdiffstats
path: root/chrome/browser/tab_contents
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-21 18:40:46 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-21 18:40:46 +0000
commit052253378d4028a4c9f903cc139282a68f70944f (patch)
tree16ce35ae9a81dc38d3919cad1c66efeb1c78df09 /chrome/browser/tab_contents
parent8dcf85af327954dccfe522f6e6d6fc66a7f24e68 (diff)
downloadchromium_src-052253378d4028a4c9f903cc139282a68f70944f.zip
chromium_src-052253378d4028a4c9f903cc139282a68f70944f.tar.gz
chromium_src-052253378d4028a4c9f903cc139282a68f70944f.tar.bz2
Enable "View page info" context menu only for pages which developer commands
are meaningful for. "View page info" can be treated as if it were a developer command in deciding whether to enable it. For example, viewing page info of chrome://newtab doesn't make much sense. Tested manually. ------------- patch by yuzo@google.com review url: <http://codereview.chromium.org/115563> git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16627 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_contents')
-rw-r--r--chrome/browser/tab_contents/render_view_context_menu.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/chrome/browser/tab_contents/render_view_context_menu.cc b/chrome/browser/tab_contents/render_view_context_menu.cc
index c99cafa..4842764 100644
--- a/chrome/browser/tab_contents/render_view_context_menu.cc
+++ b/chrome/browser/tab_contents/render_view_context_menu.cc
@@ -221,6 +221,9 @@ bool RenderViewContextMenu::IsItemCommandEnabled(int id) const {
case IDS_CONTENT_CONTEXT_VIEWPAGESOURCE:
case IDS_CONTENT_CONTEXT_VIEWFRAMESOURCE:
case IDS_CONTENT_CONTEXT_INSPECTELEMENT:
+ // Viewing page info is not a delveloper command but is meaningful for the
+ // same set of pages which developer commands are meaningful for.
+ case IDS_CONTENT_CONTEXT_VIEWPAGEINFO:
return IsDevCommandEnabled(id);
case IDS_CONTENT_CONTEXT_OPENLINKNEWTAB:
@@ -289,9 +292,6 @@ bool RenderViewContextMenu::IsItemCommandEnabled(int id) const {
case IDS_CONTENT_CONTEXT_ADD_TO_DICTIONARY:
return !params_.misspelled_word.empty();
- case IDS_CONTENT_CONTEXT_VIEWPAGEINFO:
- return (source_tab_contents_->controller().GetActiveEntry() != NULL);
-
case IDS_CONTENT_CONTEXT_RELOAD:
case IDS_CONTENT_CONTEXT_COPYIMAGE:
case IDS_CONTENT_CONTEXT_PRINT: