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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanelDelegate.java

Issue 1379183003: [ContextualSearch] Adds long press promo for Contextual Search. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing David's comments and tweaking policy Created 5 years, 2 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/compositor/bottombar/contextualsearch/ContextualSearchPanelDelegate.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanelDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanelDelegate.java
index 5966c82cfdf3e1fc38c197762461634a55853b1b..33a5649b9b1bfa179a16b590a7df60ee53c8f975 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanelDelegate.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanelDelegate.java
@@ -9,6 +9,7 @@ import org.chromium.chrome.browser.ChromeActivity;
import org.chromium.chrome.browser.compositor.bottombar.OverlayPanelContent;
import org.chromium.chrome.browser.compositor.bottombar.contextualsearch.ContextualSearchPanel.PanelState;
import org.chromium.chrome.browser.compositor.bottombar.contextualsearch.ContextualSearchPanel.StateChangeReason;
+import org.chromium.chrome.browser.compositor.layouts.ChromeAnimation;
import org.chromium.content.browser.ContentViewCore;
/**
@@ -93,10 +94,14 @@ public interface ContextualSearchPanelDelegate {
void setDidSearchInvolvePromo();
/**
- * Sets whether the promo is active.
- * @param shown Whether the promo is active.
+ * @param isActive Whether the promo is active.
*/
- void setIsPromoActive(boolean shown);
+ void setIsPromoActive(boolean isActive);
+
+ /**
+ * Shows the peek promo.
+ */
+ void showPeekPromo();
/**
* Gets whether a touch on the search content view has been done yet or not.
@@ -187,6 +192,12 @@ public interface ContextualSearchPanelDelegate {
void setSearchContentViewVisibility(boolean isVisible);
/**
+ * Creates an {@link org.chromium.chrome.browser.compositor.layouts.ChromeAnimation.Animatable}
+ * and adds it to the animation, setting the start value at the beginning of the animation.
+ */
+ <T extends Enum<?>> void addToAnimation(ChromeAnimation.Animatable<T> object, T prop,
+ float start, float end, long duration, long startTime);
+ /**
* @param panelContent The OverlayPanelContent that this panel should use.
*/
@VisibleForTesting

Powered by Google App Engine
This is Rietveld 408576698