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

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: 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..f9054f22b2785bc17d6b5ce637cb223536497c7a 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 matched by 3 groups: Link, Image, and Video. Each "group" will contain items
Ted C 2017/03/11 00:31:14 I wouldn't list out the groups here. We could add
JJ 2017/03/13 20:24:29 Done.
+ * related to said group as well as a integer that is a string resource for the group. Image
Ted C 2017/03/11 00:31:14 tiny nit, but align follow up lines to be aligned
JJ 2017/03/13 20:24:29 Done.
+ * items will have items that belong to that are related to that group. If the link pressed is
+ * contains multiple times (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<ContextMenuItems>>> 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