Index: chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java |
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java b/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java |
index 496e81def3560abef6d80be3a63d260d90c79725..6ef4fcdda74e24240866b4ff7f80b046ff20765b 100644 |
--- a/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java |
+++ b/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java |
@@ -75,6 +75,10 @@ public class ChromeContextMenuPopulator implements ContextMenuPopulator { |
menu.findItem(R.id.contextmenu_open_original_image_in_new_tab).setVisible(false); |
} |
+ // Avoid showing open image option for same image which is already opened. |
+ if (mDelegate.getPageUrl().equals(params.getSrcUrl())) { |
+ menu.findItem(R.id.contextmenu_open_image).setVisible(false); |
+ } |
final TemplateUrlService templateUrlServiceInstance = TemplateUrlService.getInstance(); |
final boolean isSearchByImageAvailable = |
UrlUtilities.isDownloadableScheme(params.getSrcUrl()) && |