summaryrefslogtreecommitdiffstats
path: root/chrome/browser/tab_contents
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-20 00:29:29 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-20 00:29:29 +0000
commita04aef09a3b4264a86f52f055c8593d8a8979798 (patch)
treeb056ed3022b84d6ae5841edeea470a56483f0138 /chrome/browser/tab_contents
parent4616877c53ecaa15bf83cf5d98b4bf57148babf0 (diff)
downloadchromium_src-a04aef09a3b4264a86f52f055c8593d8a8979798.zip
chromium_src-a04aef09a3b4264a86f52f055c8593d8a8979798.tar.gz
chromium_src-a04aef09a3b4264a86f52f055c8593d8a8979798.tar.bz2
Disable the "Copy Image" context menu option when the user right-clicks a blocked image.
BUG=36021 TEST=Right-click a blocked image, "copy image" should be greyed out Review URL: http://codereview.chromium.org/651075 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39524 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, 4 insertions, 2 deletions
diff --git a/chrome/browser/tab_contents/render_view_context_menu.cc b/chrome/browser/tab_contents/render_view_context_menu.cc
index e08554e..af470c4 100644
--- a/chrome/browser/tab_contents/render_view_context_menu.cc
+++ b/chrome/browser/tab_contents/render_view_context_menu.cc
@@ -117,7 +117,7 @@ void RenderViewContextMenu::InitMenu() {
if (params_.is_editable)
AppendEditableItems();
- else if (has_selection || has_link)
+ else if (has_selection)
AppendCopyItem();
if (has_selection)
@@ -428,6 +428,9 @@ bool RenderViewContextMenu::IsItemCommandEnabled(int id) const {
return false;
return true;
+ case IDS_CONTENT_CONTEXT_COPYIMAGE:
+ return !params_.is_image_blocked;
+
case IDS_CONTENT_CONTEXT_FULLSCREEN:
// TODO(ajwong): Enable fullscreen after we actually implement this.
return false;
@@ -515,7 +518,6 @@ bool RenderViewContextMenu::IsItemCommandEnabled(int id) const {
case IDS_CONTENT_CONTEXT_ADD_TO_DICTIONARY:
return !params_.misspelled_word.empty();
- case IDS_CONTENT_CONTEXT_COPYIMAGE:
#if !defined(OS_CHROMEOS)
case IDS_CONTENT_CONTEXT_PRINT:
#endif