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

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: Changes from last dtrainor@ review 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 6482bcbbdf5b95aec30dad9c23d55e1f951b243f..d171d87dacf728d87ec7b7bf3496ecead5bf2191 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
@@ -186,6 +186,9 @@ public class ContextualSearchPanel extends OverlayPanel {
if (getPeekPromoControl().isVisible()) {
getPeekPromoControl().animateAppearance();
}
+ if (getSearchProviderIconSpriteControl().shouldAnimateAppearance()) {
+ getSearchProviderIconSpriteControl().animateApperance();
+ }
}
if (fromState == PanelState.PEEKED
@@ -650,6 +653,27 @@ public class ContextualSearchPanel extends OverlayPanel {
}
// ============================================================================================
+ // Search Provider Icon Sprite
+ // ============================================================================================
+
+ private ContextualSearchSearchProviderIconSpriteControl mSearchProviderIconSpriteControl;
pedro (no code reviews) 2015/10/27 20:32:00 Nit: Can we name this class ContextualSearchIconSp
Theresa 2015/10/28 02:01:53 Done a few patchsets ago. Sorry there's been so mu
+
+ public ContextualSearchSearchProviderIconSpriteControl getSearchProviderIconSpriteControl() {
+ if (mSearchProviderIconSpriteControl == null) {
+ mSearchProviderIconSpriteControl =
pedro (no code reviews) 2015/10/27 20:32:00 Nit: Similarly, can we name this mIconSpriteContro
+ new ContextualSearchSearchProviderIconSpriteControl(this, mContext);
+ }
+
+ return mSearchProviderIconSpriteControl;
+ }
+
+ public void setShouldAnimateSearchProviderIconSprite(
+ boolean shouldAnimateSearchProviderIconSprite) {
+ getSearchProviderIconSpriteControl().setShouldAnimateAppearance(
+ shouldAnimateSearchProviderIconSprite);
+ }
+
+ // ============================================================================================
// Promo
// ============================================================================================

Powered by Google App Engine
This is Rietveld 408576698