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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/compositor/scene_layer/ContextualSearchSceneLayer.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/scene_layer/ContextualSearchSceneLayer.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/scene_layer/ContextualSearchSceneLayer.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/scene_layer/ContextualSearchSceneLayer.java
index 470788f8e3d13a4bd9791290a417c46a55459658..0f35c5d10eb9debc8a11845a352274528bb40f5e 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/scene_layer/ContextualSearchSceneLayer.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/scene_layer/ContextualSearchSceneLayer.java
@@ -8,6 +8,7 @@ import org.chromium.base.annotations.JNINamespace;
import org.chromium.chrome.R;
import org.chromium.chrome.browser.compositor.bottombar.contextualsearch.ContextualSearchPanel;
import org.chromium.chrome.browser.compositor.bottombar.contextualsearch.ContextualSearchPeekPromoControl;
+import org.chromium.chrome.browser.compositor.bottombar.contextualsearch.ContextualSearchSearchProviderIconSpriteControl;
import org.chromium.content.browser.ContentViewCore;
import org.chromium.ui.resources.ResourceManager;
@@ -69,6 +70,12 @@ public class ContextualSearchSceneLayer extends SceneLayer {
boolean searchBarShadowVisible = mSearchPanel.getSearchBarShadowVisible();
float searchBarShadowOpacity = mSearchPanel.getSearchBarShadowOpacity();
+ ContextualSearchSearchProviderIconSpriteControl spriteControl =
+ mSearchPanel.getSearchProviderIconSpriteControl();
+ boolean searchProviderIconSpriteVisible = spriteControl.isVisible();
+ int searchProviderIconSpriteFrame = spriteControl.getSpriteFrame();
+ float searchProviderIconSpriteSize = spriteControl.getSize();
+
float arrowIconOpacity = mSearchPanel.getArrowIconOpacity();
float arrowIconRotation = mSearchPanel.getArrowIconRotation();
@@ -85,7 +92,6 @@ public class ContextualSearchSceneLayer extends SceneLayer {
searchContextViewId,
searchTermViewId,
R.drawable.contextual_search_bar_shadow,
- R.drawable.google_icon,
R.drawable.breadcrumb_arrow,
ContextualSearchPanel.CLOSE_ICON_DRAWABLE_ID,
R.drawable.progress_bar_background,
@@ -93,6 +99,8 @@ public class ContextualSearchSceneLayer extends SceneLayer {
R.id.contextual_search_opt_out_promo,
R.drawable.contextual_search_promo_ripple,
searchPeekPromoTextViewId,
+ R.drawable.google_icon_sprite,
+ R.raw.google_icon_sprite,
contentViewCore,
searchPromoVisible,
searchPromoHeightPx,
@@ -115,6 +123,9 @@ public class ContextualSearchSceneLayer extends SceneLayer {
searchBarBorderHeight * mDpToPx,
searchBarShadowVisible,
searchBarShadowOpacity,
+ searchProviderIconSpriteVisible,
+ searchProviderIconSpriteFrame,
+ searchProviderIconSpriteSize,
arrowIconOpacity,
arrowIconRotation,
closeIconOpacity,
@@ -149,7 +160,6 @@ public class ContextualSearchSceneLayer extends SceneLayer {
int searchContextResourceId,
int searchTermResourceId,
int searchBarShadowResourceId,
- int searchProviderIconResourceId,
int arrowUpResourceId,
int closeIconResourceId,
int progressBarBackgroundResourceId,
@@ -157,6 +167,8 @@ public class ContextualSearchSceneLayer extends SceneLayer {
int searchPromoResourceId,
int peekPromoRippleResourceId,
int peekPromoTextResourceId,
+ int searchProviderIconSpriteBitmapResourceId,
+ int searchProviderIconSpriteMetadataResourceId,
ContentViewCore contentViewCore,
boolean searchPromoVisible,
float searchPromoHeight,
@@ -179,6 +191,9 @@ public class ContextualSearchSceneLayer extends SceneLayer {
float searchBarBorderHeight,
boolean searchBarShadowVisible,
float searchBarShadowOpacity,
+ boolean searchProviderIconSpriteVisible,
+ int searchProviderIconSpriteFrame,
+ float searchProviderIconSpriteSize,
float arrowIconOpacity,
float arrowIconRotation,
float closeIconOpacity,

Powered by Google App Engine
This is Rietveld 408576698