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

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

Issue 2747453002: Split context menu display and population/handling (Closed)
Patch Set: I'm genuinely confused on why some code did not upload Created 3 years, 9 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/ContextMenuPopulator.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ContextMenuPopulator.java b/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ContextMenuPopulator.java
index 2bc8d1c37c08383c0b80f7158697c8eaf9025af4..9e328c37240f52c8ee93c7ddea105ed3c0d4092a 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ContextMenuPopulator.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ContextMenuPopulator.java
@@ -5,8 +5,11 @@
package org.chromium.chrome.browser.contextmenu;
import android.content.Context;
+import android.util.Pair;
import android.view.ContextMenu;
+import java.util.List;
+
/**
* A delegate responsible for populating context menus and processing results from
* {@link ContextMenuHelper}.
@@ -22,8 +25,14 @@ public interface ContextMenuPopulator {
* @param menu The menu to populate.
* @param context A {@link Context} instance.
* @param params The parameters that represent what should be shown in the context menu.
+ * @return A list separate by groups. Each "group" will contain items related to said group as
+ * well as an integer that is a string resource for the group. Image items will have
+ * items that belong to that are related to that group and the string resource for the
+ * group will likely say "IMAGE". If the link pressed is contains multiple items (like
+ * an image link) the list will have both an image list and a link list.
*/
- public void buildContextMenu(ContextMenu menu, Context context, ContextMenuParams params);
+ public List<Pair<Integer, List<ContextMenuItem>>> buildContextMenu(
+ ContextMenu menu, Context context, ContextMenuParams params);
/**
* Called when a context menu item has been selected.

Powered by Google App Engine
This is Rietveld 408576698