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

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

Issue 1337703002: [Contextual Search] Add support for crushed sprites and animate the search provider icon (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add TODO's for other planned tests 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/ContextualSearchPanel.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanel.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanel.java
index b213ea335a69c1a4943edcc59effde6952756582..3c0d40171be1256b03a70e2f88d35abd7338e5b0 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanel.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanel.java
@@ -238,6 +238,9 @@ public class ContextualSearchPanel extends ContextualSearchPanelAnimation
if (getPeekPromoControl().isVisible()) {
getPeekPromoControl().animateAppearance();
}
+ if (getSearchProviderIconSpriteControl().shouldAnimateAppearance()) {
+ getSearchProviderIconSpriteControl().animateApperance();
+ }
}
if (fromState == PanelState.PEEKED
@@ -908,6 +911,28 @@ public class ContextualSearchPanel extends ContextualSearchPanelAnimation
}
// ============================================================================================
+ // Search Provider Icon Sprite
+ // ============================================================================================
+
+ private ContextualSearchSearchProviderIconSpriteControl mSearchProviderIconSpriteControl;
David Trainor- moved to gerrit 2015/10/15 21:04:57 What a name!
Theresa 2015/10/24 00:06:44 Acknowledged. I'm hoping somebody creates a Chromi
pedro (no code reviews) 2015/10/24 00:29:00 Yeah, I agree with David. Double "Search" feels we
Theresa 2015/10/27 19:48:02 Done. Updated in other places as well.
+
+ public ContextualSearchSearchProviderIconSpriteControl getSearchProviderIconSpriteControl() {
+ if (mSearchProviderIconSpriteControl == null) {
+ mSearchProviderIconSpriteControl =
+ new ContextualSearchSearchProviderIconSpriteControl(this, mContext);
+ }
+
+ return mSearchProviderIconSpriteControl;
+ }
+
+ @Override
+ public void setShouldAnimateSearchProviderIconSprite(
+ boolean shouldAnimateSearchProviderIconSprite) {
+ getSearchProviderIconSpriteControl().setShouldAnimateAppearance(
+ shouldAnimateSearchProviderIconSprite);
+ }
+
+ // ============================================================================================
// Panel Content
// ============================================================================================

Powered by Google App Engine
This is Rietveld 408576698