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

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

Issue 2751333006: Create the base Custom Context Menu Dialog. (Closed)
Patch Set: git rebase 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/ContextMenuUi.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ContextMenuUi.java b/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ContextMenuUi.java
index 59821973cc6be63a55ab2d10d98b9448ea15456e..8d233668f95e01029b295365b9e40cf80f9c7cef 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ContextMenuUi.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ContextMenuUi.java
@@ -4,7 +4,7 @@
package org.chromium.chrome.browser.contextmenu;
-import android.app.Activity;
+import android.content.Context;
import android.util.Pair;
import org.chromium.base.Callback;
@@ -18,7 +18,7 @@ import java.util.List;
public interface ContextMenuUi {
/**
* Shows the Context Menu in Chrome.
- * @param activity Used to inflate the context menu.
+ * @param context Used to inflate the context menu.
* @param params The current parameters for the the context menu.
* @param items The list of items that need to be displayed in the context menu items. This is
* taken from the return value of {@link ContextMenuPopulator#buildContextMenu(
@@ -26,7 +26,12 @@ public interface ContextMenuUi {
* @param onItemClicked When the user has pressed an item the menuId associated with the item
* is sent back through {@link Callback#onResult(Object)}. The ids that
* could be called are in ids.xml.
+ * @param onMenuShown After the menu is displayed this method should be called to present a
+ * full menu.
+ * @param onMenuClosed When the menu is closed, this method is called to do any possible final
+ * clean up.
*/
- void displayMenu(Activity activity, ContextMenuParams params,
- List<Pair<Integer, List<ContextMenuItem>>> items, Callback<Integer> onItemClicked);
+ void displayMenu(Context context, ContextMenuParams params,
+ List<Pair<Integer, List<ContextMenuItem>>> items, Callback<Integer> onItemClicked,
+ Runnable onMenuShown, Runnable onMenuClosed);
}

Powered by Google App Engine
This is Rietveld 408576698