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

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

Issue 2775373002: Add a Share Icon to Tabular Context Menu (Closed)
Patch Set: Fixed more tests! Created 3 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.chrome.browser.contextmenu; 5 package org.chromium.chrome.browser.contextmenu;
6 6
7 import android.content.Context; 7 import android.app.Activity;
8 import android.util.Pair; 8 import android.util.Pair;
9 9
10 import org.chromium.base.Callback; 10 import org.chromium.base.Callback;
11 11
12 import java.util.List; 12 import java.util.List;
13 13
14 /** 14 /**
15 * A representation of the ContextMenu UI. Given a list of items it should popul ate and display a 15 * A representation of the ContextMenu UI. Given a list of items it should popul ate and display a
16 * context menu. 16 * context menu.
17 */ 17 */
18 public interface ContextMenuUi { 18 public interface ContextMenuUi {
19 /** 19 /**
20 * Shows the Context Menu in Chrome. 20 * Shows the Context Menu in Chrome.
21 * @param context Used to inflate the context menu. 21 * @param activity Used to inflate the context menu.
22 * @param params The current parameters for the the context menu. 22 * @param params The current parameters for the the context menu.
23 * @param items The list of items that need to be displayed in the context m enu items. This is 23 * @param items The list of items that need to be displayed in the context m enu items. This is
24 * taken from the return value of {@link ContextMenuPopulator#b uildContextMenu( 24 * taken from the return value of {@link ContextMenuPopulator#b uildContextMenu(
25 * ContextMenu, Context, ContextMenuParams)}. 25 * ContextMenu, Context, ContextMenuParams)}.
26 * @param onItemClicked When the user has pressed an item the menuId associa ted with the item 26 * @param onItemClicked When the user has pressed an item the menuId associa ted with the item
27 * is sent back through {@link Callback#onResult(Object )}. The ids that 27 * is sent back through {@link Callback#onResult(Object )}. The ids that
28 * could be called are in ids.xml. 28 * could be called are in ids.xml.
29 * @param onMenuShown After the menu is displayed this method should be call ed to present a 29 * @param onMenuShown After the menu is displayed this method should be call ed to present a
30 * full menu. 30 * full menu.
31 * @param onMenuClosed When the menu is closed, this method is called to do any possible final 31 * @param onMenuClosed When the menu is closed, this method is called to do any possible final
32 * clean up. 32 * clean up.
33 */ 33 */
34 void displayMenu(Context context, ContextMenuParams params, 34 void displayMenu(Activity activity, ContextMenuParams params,
35 List<Pair<Integer, List<ContextMenuItem>>> items, Callback<Integer> onItemClicked, 35 List<Pair<Integer, List<ContextMenuItem>>> items, Callback<Integer> onItemClicked,
36 Runnable onMenuShown, Runnable onMenuClosed); 36 Runnable onMenuShown, Runnable onMenuClosed);
37 } 37 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698