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

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

Issue 22314006: A few fixes for image search: (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 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/renderer_host/chrome_render_view_host_observer.cc ('k') | chrome/browser/ui/gtk/menu_gtk.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
===================================================================
--- chrome/browser/tab_contents/render_view_context_menu.cc (revision 215736)
+++ chrome/browser/tab_contents/render_view_context_menu.cc (working copy)
@@ -190,7 +190,7 @@
{ 54, IDC_SPELLCHECK_MENU },
{ 55, IDC_CONTENT_CONTEXT_SPELLING_TOGGLE },
{ 56, IDC_SPELLCHECK_LANGUAGES_FIRST },
- { 57, IDC_CONTENT_CONTEXT_SEARCHIMAGENEWTAB },
+ { 57, IDC_CONTENT_CONTEXT_SEARCHWEBFORIMAGE },
// Add new items here and use |enum_id| from the next line.
{ 58, 0 }, // Must be the last. Increment |enum_id| when new IDC was added.
};
@@ -862,7 +862,7 @@
if (!default_provider->image_url().empty() &&
default_provider->image_url_ref().IsValidUsingTermsData(search_terms)) {
menu_model_.AddItem(
- IDC_CONTENT_CONTEXT_SEARCHIMAGENEWTAB,
+ IDC_CONTENT_CONTEXT_SEARCHWEBFORIMAGE,
l10n_util::GetStringFUTF16(IDS_CONTENT_CONTEXT_SEARCHWEBFORIMAGE,
default_provider->short_name()));
}
@@ -1275,16 +1275,12 @@
ProfileIOData::IsHandledProtocol(params_.src_url.scheme());
}
+ // The images shown in the most visited thumbnails can't be opened or
+ // searched for conventionally.
Avi (use Gerrit) 2013/08/06 02:29:41 crbug.com/2608 which was referenced earlier seems
Peter Kasting 2013/08/06 17:24:32 Yes, and I'm OK with that. Sid is no longer on th
case IDC_CONTENT_CONTEXT_OPENIMAGENEWTAB:
- case IDC_CONTENT_CONTEXT_SEARCHIMAGENEWTAB:
- // The images shown in the most visited thumbnails do not currently open
- // in a new tab as they should. Disabling this context menu option for
- // now, as a quick hack, before we resolve this issue (Issue = 2608).
- // TODO(sidchat): Enable this option once this issue is resolved.
- if (params_.src_url.scheme() == chrome::kChromeUIScheme ||
- !params_.src_url.is_valid())
- return false;
- return true;
+ case IDC_CONTENT_CONTEXT_SEARCHWEBFORIMAGE:
+ return params_.src_url.is_valid() &&
+ (params_.src_url.scheme() != chrome::kChromeUIScheme);
case IDC_CONTENT_CONTEXT_COPYIMAGE:
return !params_.is_image_blocked;
@@ -1630,7 +1626,7 @@
CopyImageAt(params_.x, params_.y);
break;
- case IDC_CONTENT_CONTEXT_SEARCHIMAGENEWTAB:
+ case IDC_CONTENT_CONTEXT_SEARCHWEBFORIMAGE:
GetImageThumbnailForSearch();
break;
« no previous file with comments | « chrome/browser/renderer_host/chrome_render_view_host_observer.cc ('k') | chrome/browser/ui/gtk/menu_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698