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

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

Issue 1103163004: [Contextual Search] Remove opt-in code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing Donn's comments Created 5 years, 7 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/ContextualSearchPanelAnimation.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanelAnimation.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanelAnimation.java
index 9172d758c9faa873e7f6497ef46d7d823e7bcec4..27fb02d8864b9f823a7964aba13be9018a8ae2b3 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanelAnimation.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanelAnimation.java
@@ -28,8 +28,7 @@ abstract class ContextualSearchPanelAnimation extends ContextualSearchPanelBase
*/
protected enum Property {
PANEL_HEIGHT,
- PROMO_VISIBILITY,
- FIRST_RUN_PANEL_HEIGHT,
+ PROMO_VISIBILITY
}
/**
@@ -110,7 +109,7 @@ abstract class ContextualSearchPanelAnimation extends ContextualSearchPanelBase
* @param reason The reason for the change of panel state.
*/
protected void expandPanel(StateChangeReason reason) {
- animatePanelToState(getIntermediaryState(), reason);
+ animatePanelToState(PanelState.EXPANDED, reason);
}
/**
@@ -194,19 +193,6 @@ abstract class ContextualSearchPanelAnimation extends ContextualSearchPanelBase
}
/**
- * Animates the Contextual Search panel after first-run success.
- */
- protected void animateAfterFirstRunSuccess() {
- final PanelState desiredState = PanelState.EXPANDED;
- mAnimatingState = desiredState;
- mAnimatingStateReason = StateChangeReason.OPTIN;
-
- final float desiredHeight = getPanelHeightFromState(desiredState);
- animateProperty(Property.FIRST_RUN_PANEL_HEIGHT, getHeight(), desiredHeight,
- BASE_ANIMATION_DURATION_MS);
- }
-
- /**
* Animates the Panel to its nearest state.
*/
protected void animateToNearestState() {
@@ -239,7 +225,7 @@ abstract class ContextualSearchPanelAnimation extends ContextualSearchPanelBase
// the EXPANDED state is the only one that will show the Promo.
if (projectedState == PanelState.MAXIMIZED
&& getPanelState() == PanelState.PEEKED
- && isPanelPromoAvailable()) {
+ && isPromoAvailable()) {
projectedState = PanelState.EXPANDED;
}
@@ -355,8 +341,6 @@ abstract class ContextualSearchPanelAnimation extends ContextualSearchPanelBase
setPanelHeight(value);
} else if (prop == Property.PROMO_VISIBILITY) {
setPromoVisibilityForOptInAnimation(value);
- } else if (prop == Property.FIRST_RUN_PANEL_HEIGHT) {
- setPanelHeightForPromoOptInAnimation(value);
}
}

Powered by Google App Engine
This is Rietveld 408576698