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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java

Issue 396063009: Context Menu "Open image" doesn't make sense in a Image URL Tab (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated comment as suggested Created 6 years, 5 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
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()) &&

Powered by Google App Engine
This is Rietveld 408576698