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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/compositor/scene_layer/ContextualSearchSceneLayer.java

Issue 2798123002: Remove crushed sprite resource and layer (Closed)
Patch Set: Rebase and fix my nits Created 3 years, 8 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 f916aac9756536b5037602ccf10d282a19b517f1..cb26d3be33935a93ff876f95667cb073c3282be2 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,7 +8,6 @@ import org.chromium.base.annotations.CalledByNative;
import org.chromium.base.annotations.JNINamespace;
import org.chromium.chrome.R;
import org.chromium.chrome.browser.compositor.bottombar.contextualsearch.ContextualSearchBarControl;
-import org.chromium.chrome.browser.compositor.bottombar.contextualsearch.ContextualSearchIconSpriteControl;
import org.chromium.chrome.browser.compositor.bottombar.contextualsearch.ContextualSearchImageControl;
import org.chromium.chrome.browser.compositor.bottombar.contextualsearch.ContextualSearchPanel;
import org.chromium.chrome.browser.compositor.bottombar.contextualsearch.ContextualSearchPeekPromoControl;
@@ -77,8 +76,8 @@ public class ContextualSearchSceneLayer extends SceneOverlayLayer {
float searchPeekPromoRippleOpacity = peekPromoControl.getRippleOpacity();
float searchPeekPromoTextOpacity = peekPromoControl.getTextOpacity();
- float staticImageVisibilityPercentage = imageControl.getStaticImageVisibilityPercentage();
- int staticImageSize = imageControl.getStaticImageSize();
+ float customImageVisibilityPercentage = imageControl.getCustomImageVisibilityPercentage();
+ int barImageSize = imageControl.getBarImageSize();
boolean quickActionIconVisible = imageControl.getQuickActionIconVisible();
int quickActionIconResId = imageControl.getQuickActionIconResourceId();
@@ -86,10 +85,6 @@ public class ContextualSearchSceneLayer extends SceneOverlayLayer {
boolean thumbnailVisible = imageControl.getThumbnailVisible();
String thumbnailUrl = imageControl.getThumbnailUrl();
- ContextualSearchIconSpriteControl spriteControl = imageControl.getIconSpriteControl();
- boolean searchProviderIconSpriteVisible = spriteControl.isVisible();
- float searchProviderIconCompletionPercentage = spriteControl.getCompletionPercentage();
-
float searchPanelX = panel.getOffsetX();
float searchPanelY = panel.getOffsetY();
float searchPanelWidth = panel.getWidth();
@@ -135,74 +130,29 @@ public class ContextualSearchSceneLayer extends SceneOverlayLayer {
WebContents panelWebContents = panel.getContentViewCore() != null
? panel.getContentViewCore().getWebContents() : null;
- nativeUpdateContextualSearchLayer(mNativePtr,
- R.drawable.contextual_search_bar_background,
- searchContextViewId,
- searchTermViewId,
- searchCaptionViewId,
- R.drawable.contextual_search_bar_shadow,
- R.drawable.google_icon_sprite,
- R.raw.google_icon_sprite,
- quickActionIconResId,
- R.drawable.breadcrumb_arrow,
- ContextualSearchPanel.CLOSE_ICON_DRAWABLE_ID,
- R.drawable.progress_bar_background,
- R.drawable.progress_bar_foreground,
- searchPromoViewId,
- R.drawable.contextual_search_promo_ripple,
- searchPeekPromoTextViewId,
- mDpToPx,
- panel.getBasePageBrightness(),
- panel.getBasePageY() * mDpToPx,
- panelWebContents,
- searchPromoVisible,
- searchPromoHeightPx,
- searchPromoOpacity,
- searchPeekPromoVisible,
- searchPeekPromoHeightPx,
- searchPeekPromoPaddingPx,
- searchPeekPromoRippleWidthPx,
- searchPeekPromoRippleOpacity,
- searchPeekPromoTextOpacity,
- searchPanelX * mDpToPx,
- searchPanelY * mDpToPx,
- searchPanelWidth * mDpToPx,
- searchPanelHeight * mDpToPx,
- searchBarMarginSide * mDpToPx,
- searchBarHeight * mDpToPx,
- searchContextOpacity,
- searchBarControl.getTextLayerMinHeight(),
- searchTermOpacity,
- searchBarControl.getSearchTermCaptionSpacing(),
- searchCaptionAnimationPercentage,
- searchCaptionVisible,
- searchBarBorderVisible,
- searchBarBorderHeight * mDpToPx,
- searchBarShadowVisible,
- searchBarShadowOpacity,
- searchProviderIconSpriteVisible,
- searchProviderIconCompletionPercentage,
- quickActionIconVisible,
- thumbnailVisible,
- thumbnailUrl,
- staticImageVisibilityPercentage,
- staticImageSize,
- arrowIconOpacity,
- arrowIconRotation,
- closeIconOpacity,
- isProgressBarVisible,
- progressBarHeight * mDpToPx,
- progressBarOpacity,
- progressBarCompletion,
- dividerLineVisibilityPercentage,
- dividerLineWidth,
- dividerLineHeight,
- dividerLineColor,
- dividerLineXOffset,
- touchHighlightVisible,
- touchHighlightXOffset,
- touchHighlightWidth,
- Profile.getLastUsedProfile());
+ nativeUpdateContextualSearchLayer(mNativePtr, R.drawable.contextual_search_bar_background,
+ searchContextViewId, searchTermViewId, searchCaptionViewId,
+ R.drawable.contextual_search_bar_shadow, R.drawable.googleg, quickActionIconResId,
+ R.drawable.breadcrumb_arrow, ContextualSearchPanel.CLOSE_ICON_DRAWABLE_ID,
+ R.drawable.progress_bar_background, R.drawable.progress_bar_foreground,
+ searchPromoViewId, R.drawable.contextual_search_promo_ripple,
+ searchPeekPromoTextViewId, mDpToPx, panel.getBasePageBrightness(),
+ panel.getBasePageY() * mDpToPx, panelWebContents, searchPromoVisible,
+ searchPromoHeightPx, searchPromoOpacity, searchPeekPromoVisible,
+ searchPeekPromoHeightPx, searchPeekPromoPaddingPx, searchPeekPromoRippleWidthPx,
+ searchPeekPromoRippleOpacity, searchPeekPromoTextOpacity, searchPanelX * mDpToPx,
+ searchPanelY * mDpToPx, searchPanelWidth * mDpToPx, searchPanelHeight * mDpToPx,
+ searchBarMarginSide * mDpToPx, searchBarHeight * mDpToPx, searchContextOpacity,
+ searchBarControl.getTextLayerMinHeight(), searchTermOpacity,
+ searchBarControl.getSearchTermCaptionSpacing(), searchCaptionAnimationPercentage,
+ searchCaptionVisible, searchBarBorderVisible, searchBarBorderHeight * mDpToPx,
+ searchBarShadowVisible, searchBarShadowOpacity, quickActionIconVisible,
+ thumbnailVisible, thumbnailUrl, customImageVisibilityPercentage, barImageSize,
+ arrowIconOpacity, arrowIconRotation, closeIconOpacity, isProgressBarVisible,
+ progressBarHeight * mDpToPx, progressBarOpacity, progressBarCompletion,
+ dividerLineVisibilityPercentage, dividerLineWidth, dividerLineHeight,
+ dividerLineColor, dividerLineXOffset, touchHighlightVisible, touchHighlightXOffset,
+ touchHighlightWidth, Profile.getLastUsedProfile());
}
@CalledByNative
@@ -250,73 +200,28 @@ public class ContextualSearchSceneLayer extends SceneOverlayLayer {
SceneLayer contentTree);
private native void nativeHideTree(
long nativeContextualSearchSceneLayer);
- private native void nativeUpdateContextualSearchLayer(
- long nativeContextualSearchSceneLayer,
- int searchBarBackgroundResourceId,
- int searchContextResourceId,
- int searchTermResourceId,
- int searchCaptionResourceId,
- int searchBarShadowResourceId,
- int spriteResourceId,
- int searchProviderIconSpriteMetadataResourceId,
- int quickActionIconResourceId,
- int arrowUpResourceId,
- int closeIconResourceId,
- int progressBarBackgroundResourceId,
- int progressBarResourceId,
- int searchPromoResourceId,
- int peekPromoRippleResourceId,
- int peekPromoTextResourceId,
- float dpToPx,
- float basePageBrightness,
- float basePageYOffset,
- WebContents webContents,
- boolean searchPromoVisible,
- float searchPromoHeight,
- float searchPromoOpacity,
- boolean searchPeekPromoVisible,
- float searchPeekPromoHeight,
- float searchPeekPromoPaddingPx,
- float searchPeekPromoRippleWidth,
- float searchPeekPromoRippleOpacity,
- float searchPeekPromoTextOpacity,
- float searchPanelX,
- float searchPanelY,
- float searchPanelWidth,
- float searchPanelHeight,
- float searchBarMarginSide,
- float searchBarHeight,
- float searchContextOpacity,
- float searchTextLayerMinHeight,
- float searchTermOpacity,
- float searchTermCaptionSpacing,
- float searchCaptionAnimationPercentage,
- boolean searchCaptionVisible,
- boolean searchBarBorderVisible,
- float searchBarBorderHeight,
- boolean searchBarShadowVisible,
- float searchBarShadowOpacity,
- boolean searchProviderIconSpriteVisible,
- float searchProviderIconCompletionPercentage,
- boolean quickActionIconVisible,
- boolean thumbnailVisible,
- String thumbnailUrl,
- float staticImageVisibilityPercentage,
- int staticImageSize,
- float arrowIconOpacity,
- float arrowIconRotation,
- float closeIconOpacity,
- boolean isProgressBarVisible,
- float progressBarHeight,
- float progressBarOpacity,
- int progressBarCompletion,
- float dividerLineVisibilityPercentage,
- float dividerLineWidth,
- float dividerLineHeight,
- int dividerLineColor,
- float dividerLineXOffset,
- boolean touchHighlightVisible,
- float touchHighlightXOffset,
- float toucHighlightWidth,
- Profile profile);
+ private native void nativeUpdateContextualSearchLayer(long nativeContextualSearchSceneLayer,
+ int searchBarBackgroundResourceId, int searchContextResourceId,
+ int searchTermResourceId, int searchCaptionResourceId, int searchBarShadowResourceId,
+ int searchProviderIconResourceId, int quickActionIconResourceId, int arrowUpResourceId,
+ int closeIconResourceId, int progressBarBackgroundResourceId, int progressBarResourceId,
+ int searchPromoResourceId, int peekPromoRippleResourceId, int peekPromoTextResourceId,
+ float dpToPx, float basePageBrightness, float basePageYOffset, WebContents webContents,
+ boolean searchPromoVisible, float searchPromoHeight, float searchPromoOpacity,
+ boolean searchPeekPromoVisible, float searchPeekPromoHeight,
+ float searchPeekPromoPaddingPx, float searchPeekPromoRippleWidth,
+ float searchPeekPromoRippleOpacity, float searchPeekPromoTextOpacity,
+ float searchPanelX, float searchPanelY, float searchPanelWidth, float searchPanelHeight,
+ float searchBarMarginSide, float searchBarHeight, float searchContextOpacity,
+ float searchTextLayerMinHeight, float searchTermOpacity, float searchTermCaptionSpacing,
+ float searchCaptionAnimationPercentage, boolean searchCaptionVisible,
+ boolean searchBarBorderVisible, float searchBarBorderHeight,
+ boolean searchBarShadowVisible, float searchBarShadowOpacity,
+ boolean quickActionIconVisible, boolean thumbnailVisible, String thumbnailUrl,
+ float customImageVisibilityPercentage, int barImageSize, float arrowIconOpacity,
+ float arrowIconRotation, float closeIconOpacity, boolean isProgressBarVisible,
+ float progressBarHeight, float progressBarOpacity, int progressBarCompletion,
+ float dividerLineVisibilityPercentage, float dividerLineWidth, float dividerLineHeight,
+ int dividerLineColor, float dividerLineXOffset, boolean touchHighlightVisible,
+ float touchHighlightXOffset, float toucHighlightWidth, Profile profile);
}

Powered by Google App Engine
This is Rietveld 408576698