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

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

Issue 2363843002: [Contextual Search] Animate thumbnail appearance (Closed)
Patch Set: Changes from donnd@ review Created 4 years, 3 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/ContextualSearchIconSpriteControl.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchIconSpriteControl.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchIconSpriteControl.java
index 94685d053503f94a526f685d1a8a592f32caaaf3..a88cccfa609f6c7367117b3f1d56b8f476252707 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchIconSpriteControl.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchIconSpriteControl.java
@@ -22,14 +22,10 @@ public class ContextualSearchIconSpriteControl implements
APPEARANCE
}
- /**
- * Whether the search provider icon sprite is visible.
- */
+ /** Whether the search provider icon sprite is visible. */
private boolean mIsVisible;
- /**
- * Whether the appearance of the search provider icon sprite should be animated.
- */
+ /** Whether the appearance of the search provider icon sprite should be animated. */
private boolean mShouldAnimateAppearance;
/**
@@ -37,18 +33,16 @@ public class ContextualSearchIconSpriteControl implements
*/
private float mCompletionPercentage;
- /**
- * The panel.
- */
- private ContextualSearchPanel mPanel;
+ /** The OverlayPanelAnimation used to add animations. */
+ private OverlayPanelAnimation mOverlayPanelAnimation;
/**
- * @param panel The panel.
+ * @param overlayPanelAnimation The OverlayPanelAnimation used to add animations.
* @param context The Android Context used to retrieve resources.
*/
- public ContextualSearchIconSpriteControl(
- ContextualSearchPanel panel, Context context) {
- mPanel = panel;
+ public ContextualSearchIconSpriteControl(OverlayPanelAnimation overlayPanelAnimation,
+ Context context) {
+ mOverlayPanelAnimation = overlayPanelAnimation;
}
/**
@@ -107,7 +101,7 @@ public class ContextualSearchIconSpriteControl implements
public void animateApperance() {
// The search provider icon sprite should be visible once the animation starts.
mIsVisible = true;
- mPanel.addToAnimation(this, AnimationType.APPEARANCE, 0.f, 1.f,
+ mOverlayPanelAnimation.addToAnimation(this, AnimationType.APPEARANCE, 0.f, 1.f,
OverlayPanelAnimation.MAXIMUM_ANIMATION_DURATION_MS, 0);
}

Powered by Google App Engine
This is Rietveld 408576698