Chromium Code Reviews| Index: chrome/android/java/src/org/chromium/chrome/browser/context_menu/ChromeContextMenuItemDelegate.java |
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/context_menu/ChromeContextMenuItemDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/context_menu/ChromeContextMenuItemDelegate.java |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..15d5d7994f4d50c165d78bf3f54f50d72d6e19c1 |
| --- /dev/null |
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/context_menu/ChromeContextMenuItemDelegate.java |
| @@ -0,0 +1,77 @@ |
| +// Copyright 2013 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +package org.chromium.chrome.browser.context_menu; |
|
Ted C
2013/11/19 02:44:03
normally there aren't _'s in java package names.
David Trainor- moved to gerrit
2013/11/25 19:42:50
Done.
|
| + |
| +/** |
| + * A delegate responsible for taking actions based on context menu selections. |
| + */ |
| +public interface ChromeContextMenuItemDelegate { |
| + /** |
| + * @return Whether or not this context menu is being shown for an incognito {@link ContentView}. |
| + */ |
| + public boolean isIncognito(); |
|
Ted C
2013/11/19 02:44:03
public isn't needed in interface descriptions
David Trainor- moved to gerrit
2013/11/25 19:42:50
Done.
|
| + |
| + /** |
| + * @return Whether or not the current application can show incognito tabs. |
| + */ |
| + public boolean isIncognitoSupported(); |
| + |
| + /** |
| + * @return Whether or not the context menu should give the user the chance to show the original |
| + * image. |
| + */ |
| + public boolean canLoadOriginalImage(); |
| + |
| + /** |
| + * Called when {@code url} should be opened in a new tab with the same incognito state as the |
|
Ted C
2013/11/19 02:44:03
when [the] {@code url}
?? same other places
David Trainor- moved to gerrit
2013/11/25 19:42:50
Done.
|
| + * current {@link ContentView}. |
|
Ted C
2013/11/19 02:44:03
TabBase ?
David Trainor- moved to gerrit
2013/11/25 19:42:50
Done.
|
| + * @param url The URL to open. |
| + */ |
| + public void onOpenInNewTab(String url); |
| + |
| + /** |
| + * Called when {@code url} should be opened in a new incognito tab. |
| + * @param url The URL to open. |
| + */ |
| + public void onOpenInNewIncognitoTab(String url); |
| + |
| + /** |
| + * Called when {@code url} is of an image and should be opened in the same tab. |
| + * @param url The image URL to open. |
| + */ |
| + public void onOpenImageUrl(String url); |
| + |
| + /** |
| + * Called when {@code url} is of an image and should be opened in a new tab. |
| + * @param url The image URL to open. |
| + */ |
| + public void onOpenImageInNewTab(String url); |
| + |
| + /** |
| + * Called when {@code text} should be saved to the clipboard. |
| + * @param text The text to save to the clipboard. |
| + * @param isUrl Whether or not the text is a URL. |
| + */ |
| + public void onSaveToClipboard(String text, boolean isUrl); |
| + |
| + /** |
| + * Called when {@code url} is of an image and a link to the image should be saved to the |
| + * clipboard. |
| + * @param url The image URL. |
| + */ |
| + public void onSaveImageToClipboard(String url); |
| + |
| + /** |
| + * Called when {@code url} should be downloaded. |
| + * @param url The URL to download. |
| + * @param isLink Whether or not URL is a link. |
| + */ |
| + public void onStartDownload(String url, boolean isLink); |
| + |
| + /** |
| + * Called when a search by image should be performed in a new tab. |
| + */ |
| + public void onSearchByImageInNewTab(); |
| +} |