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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/context_menu/ChromeContextMenuItemDelegate.java

Issue 73173002: Add ContextMenu support upstream for Android (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix bug in clipboard Created 7 years, 1 month 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/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();
+}

Powered by Google App Engine
This is Rietveld 408576698