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

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

Issue 2360103002: Removing unnecessary context menu logic (Closed)
Patch Set: fixed nits Created 4 years, 3 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/ContextMenuHelper.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ContextMenuHelper.java b/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ContextMenuHelper.java
index 172c09d7c393febb93d09a43b26aaaa567ba6aa6..7e04106c422f4396283bbb88ec9cfec09390d605 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ContextMenuHelper.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ContextMenuHelper.java
@@ -58,13 +58,13 @@ public class ContextMenuHelper implements OnCreateContextMenuListener, OnMenuIte
* @param params The {@link ContextMenuParams} that indicate what menu items to show.
*/
@CalledByNative
- private boolean showContextMenu(ContentViewCore contentViewCore, ContextMenuParams params) {
+ private void showContextMenu(ContentViewCore contentViewCore, ContextMenuParams params) {
final View view = contentViewCore.getContainerView();
if (view == null
|| view.getVisibility() != View.VISIBLE
|| view.getParent() == null) {
- return false;
+ return;
}
mCurrentContextMenuParams = params;
@@ -74,10 +74,7 @@ public class ContextMenuHelper implements OnCreateContextMenuListener, OnMenuIte
WebContents webContents = contentViewCore.getWebContents();
RecordHistogram.recordBooleanHistogram(
"ContextMenu.Shown", webContents != null);
- if (webContents != null) webContents.onContextMenuOpened();
- return true;
}
- return false;
}
/**

Powered by Google App Engine
This is Rietveld 408576698