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

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

Issue 2449653002: [Contextual Search] Add support for a static icon (Closed)
Patch Set: Changes from donnd@ review Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.chrome.browser.compositor.scene_layer; 5 package org.chromium.chrome.browser.compositor.scene_layer;
6 6
7 import org.chromium.base.annotations.CalledByNative; 7 import org.chromium.base.annotations.CalledByNative;
8 import org.chromium.base.annotations.JNINamespace; 8 import org.chromium.base.annotations.JNINamespace;
9 import org.chromium.chrome.R; 9 import org.chromium.chrome.R;
10 import org.chromium.chrome.browser.compositor.bottombar.contextualsearch.Context ualSearchBarControl; 10 import org.chromium.chrome.browser.compositor.bottombar.contextualsearch.Context ualSearchBarControl;
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 float searchPromoOpacity = promoControl.getOpacity(); 70 float searchPromoOpacity = promoControl.getOpacity();
71 71
72 int searchPeekPromoTextViewId = peekPromoControl.getViewId(); 72 int searchPeekPromoTextViewId = peekPromoControl.getViewId();
73 boolean searchPeekPromoVisible = peekPromoControl.isVisible(); 73 boolean searchPeekPromoVisible = peekPromoControl.isVisible();
74 float searchPeekPromoHeightPx = peekPromoControl.getHeightPx(); 74 float searchPeekPromoHeightPx = peekPromoControl.getHeightPx();
75 float searchPeekPromoPaddingPx = peekPromoControl.getPaddingPx(); 75 float searchPeekPromoPaddingPx = peekPromoControl.getPaddingPx();
76 float searchPeekPromoRippleWidthPx = peekPromoControl.getRippleWidthPx() ; 76 float searchPeekPromoRippleWidthPx = peekPromoControl.getRippleWidthPx() ;
77 float searchPeekPromoRippleOpacity = peekPromoControl.getRippleOpacity() ; 77 float searchPeekPromoRippleOpacity = peekPromoControl.getRippleOpacity() ;
78 float searchPeekPromoTextOpacity = peekPromoControl.getTextOpacity(); 78 float searchPeekPromoTextOpacity = peekPromoControl.getTextOpacity();
79 79
80 float staticImageVisibilityPercentage = imageControl.getStaticImageVisib ilityPercentage();
81 int staticImageSize = imageControl.getStaticImageSize();
82
83 boolean staticIconVisible = imageControl.getStaticIconVisible();
84 int staticIconResId = imageControl.getStaticIconResourceId();
85
80 boolean thumbnailVisible = imageControl.getThumbnailVisible(); 86 boolean thumbnailVisible = imageControl.getThumbnailVisible();
81 String thumbnailUrl = imageControl.getThumbnailUrl(); 87 String thumbnailUrl = imageControl.getThumbnailUrl();
82 float thumbnailVisibilityPercentage = imageControl.getThumbnailVisibilit yPercentage();
83 int thumbnailSize = imageControl.getThumbnailSize();
84 88
85 ContextualSearchIconSpriteControl spriteControl = imageControl.getIconSp riteControl(); 89 ContextualSearchIconSpriteControl spriteControl = imageControl.getIconSp riteControl();
86 boolean searchProviderIconSpriteVisible = spriteControl.isVisible(); 90 boolean searchProviderIconSpriteVisible = spriteControl.isVisible();
87 float searchProviderIconCompletionPercentage = spriteControl.getCompleti onPercentage(); 91 float searchProviderIconCompletionPercentage = spriteControl.getCompleti onPercentage();
88 92
89 float searchPanelX = panel.getOffsetX(); 93 float searchPanelX = panel.getOffsetX();
90 float searchPanelY = panel.getOffsetY(); 94 float searchPanelY = panel.getOffsetY();
91 float searchPanelWidth = panel.getWidth(); 95 float searchPanelWidth = panel.getWidth();
92 float searchPanelHeight = panel.getHeight(); 96 float searchPanelHeight = panel.getHeight();
93 97
(...skipping 27 matching lines...) Expand all
121 ? panel.getContentViewCore().getWebContents() : null; 125 ? panel.getContentViewCore().getWebContents() : null;
122 126
123 nativeUpdateContextualSearchLayer(mNativePtr, 127 nativeUpdateContextualSearchLayer(mNativePtr,
124 R.drawable.contextual_search_bar_background, 128 R.drawable.contextual_search_bar_background,
125 searchContextViewId, 129 searchContextViewId,
126 searchTermViewId, 130 searchTermViewId,
127 searchCaptionViewId, 131 searchCaptionViewId,
128 R.drawable.contextual_search_bar_shadow, 132 R.drawable.contextual_search_bar_shadow,
129 R.drawable.google_icon_sprite, 133 R.drawable.google_icon_sprite,
130 R.raw.google_icon_sprite, 134 R.raw.google_icon_sprite,
135 staticIconResId,
131 R.drawable.breadcrumb_arrow, 136 R.drawable.breadcrumb_arrow,
132 ContextualSearchPanel.CLOSE_ICON_DRAWABLE_ID, 137 ContextualSearchPanel.CLOSE_ICON_DRAWABLE_ID,
133 R.drawable.progress_bar_background, 138 R.drawable.progress_bar_background,
134 R.drawable.progress_bar_foreground, 139 R.drawable.progress_bar_foreground,
135 searchPromoViewId, 140 searchPromoViewId,
136 R.drawable.contextual_search_promo_ripple, 141 R.drawable.contextual_search_promo_ripple,
137 searchPeekPromoTextViewId, 142 searchPeekPromoTextViewId,
138 mDpToPx, 143 mDpToPx,
139 panel.getBasePageBrightness(), 144 panel.getBasePageBrightness(),
140 panel.getBasePageY() * mDpToPx, 145 panel.getBasePageY() * mDpToPx,
(...skipping 18 matching lines...) Expand all
159 searchTermOpacity, 164 searchTermOpacity,
160 searchBarControl.getSearchTermCaptionSpacing(), 165 searchBarControl.getSearchTermCaptionSpacing(),
161 searchCaptionAnimationPercentage, 166 searchCaptionAnimationPercentage,
162 searchCaptionVisible, 167 searchCaptionVisible,
163 searchBarBorderVisible, 168 searchBarBorderVisible,
164 searchBarBorderHeight * mDpToPx, 169 searchBarBorderHeight * mDpToPx,
165 searchBarShadowVisible, 170 searchBarShadowVisible,
166 searchBarShadowOpacity, 171 searchBarShadowOpacity,
167 searchProviderIconSpriteVisible, 172 searchProviderIconSpriteVisible,
168 searchProviderIconCompletionPercentage, 173 searchProviderIconCompletionPercentage,
174 staticIconVisible,
169 thumbnailVisible, 175 thumbnailVisible,
170 thumbnailVisibilityPercentage,
171 thumbnailSize,
172 thumbnailUrl, 176 thumbnailUrl,
177 staticImageVisibilityPercentage,
178 staticImageSize,
173 arrowIconOpacity, 179 arrowIconOpacity,
174 arrowIconRotation, 180 arrowIconRotation,
175 closeIconOpacity, 181 closeIconOpacity,
176 isProgressBarVisible, 182 isProgressBarVisible,
177 progressBarHeight * mDpToPx, 183 progressBarHeight * mDpToPx,
178 progressBarOpacity, 184 progressBarOpacity,
179 progressBarCompletion, 185 progressBarCompletion,
180 Profile.getLastUsedProfile()); 186 Profile.getLastUsedProfile());
181 } 187 }
182 188
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 SceneLayer contentTree); 231 SceneLayer contentTree);
226 private native void nativeHideTree( 232 private native void nativeHideTree(
227 long nativeContextualSearchSceneLayer); 233 long nativeContextualSearchSceneLayer);
228 private native void nativeUpdateContextualSearchLayer( 234 private native void nativeUpdateContextualSearchLayer(
229 long nativeContextualSearchSceneLayer, 235 long nativeContextualSearchSceneLayer,
230 int searchBarBackgroundResourceId, 236 int searchBarBackgroundResourceId,
231 int searchContextResourceId, 237 int searchContextResourceId,
232 int searchTermResourceId, 238 int searchTermResourceId,
233 int searchCaptionResourceId, 239 int searchCaptionResourceId,
234 int searchBarShadowResourceId, 240 int searchBarShadowResourceId,
235 int panelIconResourceId, 241 int spriteResourceId,
236 int searchProviderIconSpriteMetadataResourceId, 242 int searchProviderIconSpriteMetadataResourceId,
243 int staticIconResourceId,
237 int arrowUpResourceId, 244 int arrowUpResourceId,
238 int closeIconResourceId, 245 int closeIconResourceId,
239 int progressBarBackgroundResourceId, 246 int progressBarBackgroundResourceId,
240 int progressBarResourceId, 247 int progressBarResourceId,
241 int searchPromoResourceId, 248 int searchPromoResourceId,
242 int peekPromoRippleResourceId, 249 int peekPromoRippleResourceId,
243 int peekPromoTextResourceId, 250 int peekPromoTextResourceId,
244 float dpToPx, 251 float dpToPx,
245 float basePageBrightness, 252 float basePageBrightness,
246 float basePageYOffset, 253 float basePageYOffset,
(...skipping 18 matching lines...) Expand all
265 float searchTermOpacity, 272 float searchTermOpacity,
266 float searchTermCaptionSpacing, 273 float searchTermCaptionSpacing,
267 float searchCaptionAnimationPercentage, 274 float searchCaptionAnimationPercentage,
268 boolean searchCaptionVisible, 275 boolean searchCaptionVisible,
269 boolean searchBarBorderVisible, 276 boolean searchBarBorderVisible,
270 float searchBarBorderHeight, 277 float searchBarBorderHeight,
271 boolean searchBarShadowVisible, 278 boolean searchBarShadowVisible,
272 float searchBarShadowOpacity, 279 float searchBarShadowOpacity,
273 boolean searchProviderIconSpriteVisible, 280 boolean searchProviderIconSpriteVisible,
274 float searchProviderIconCompletionPercentage, 281 float searchProviderIconCompletionPercentage,
282 boolean staticIconVisible,
275 boolean thumbnailVisible, 283 boolean thumbnailVisible,
276 float thumbnailVisibilityPercentage,
277 int thumbnailSize,
278 String thumbnailUrl, 284 String thumbnailUrl,
285 float staticImageVisibilityPercentage,
286 int staticImageSize,
279 float arrowIconOpacity, 287 float arrowIconOpacity,
280 float arrowIconRotation, 288 float arrowIconRotation,
281 float closeIconOpacity, 289 float closeIconOpacity,
282 boolean isProgressBarVisible, 290 boolean isProgressBarVisible,
283 float progressBarHeight, 291 float progressBarHeight,
284 float progressBarOpacity, 292 float progressBarOpacity,
285 int progressBarCompletion, 293 int progressBarCompletion,
286 Profile profile); 294 Profile profile);
287 } 295 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698