Chromium Code Reviews| Index: chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPage.java |
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPage.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPage.java |
| index ba6e1ce99015ed7100e25ee53806984aa2a1a178..093b815327b8d8badde527ac9d114964e5a18280 100644 |
| --- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPage.java |
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPage.java |
| @@ -8,6 +8,7 @@ import android.annotation.TargetApi; |
| import android.app.Activity; |
| import android.content.Context; |
| import android.graphics.Canvas; |
| +import android.graphics.Point; |
| import android.graphics.Rect; |
| import android.net.Uri; |
| import android.os.Build; |
| @@ -655,16 +656,21 @@ public class NewTabPage |
| /** |
| * Get the bounds of the search box in relation to the top level NewTabPage view. |
| * |
| - * @param originalBounds The bounding region of the search box without external transforms |
| - * applied. The delta between this and the transformed bounds determines |
| - * the amount of scroll applied to this view. |
| - * @param transformedBounds The bounding region of the search box including any transforms |
| - * applied by the parent view hierarchy up to the NewTabPage view. |
| - * This more accurately reflects the current drawing location of the |
| - * search box. |
| + * @param bounds The current drawing location of the search box. |
| + * @param translation The translation applied to the search box by the parent view hierarchy up |
| + * to the NewTabPage view. |
|
Ted C
2016/07/19 19:11:31
align to "The translation ..." above
Bernhard Bauer
2016/07/21 13:10:03
Done.
|
| */ |
| - public void getSearchBoxBounds(Rect originalBounds, Rect transformedBounds) { |
| - mNewTabPageView.getSearchBoxBounds(originalBounds, transformedBounds); |
| + public void getSearchBoxBounds(Rect bounds, Point translation) { |
| + mNewTabPageView.getSearchBoxBounds(bounds, translation); |
| + } |
| + |
| + /** |
| + * Updates the opacity of the search UI (fake omnibox and search provider logo) when scrolling. |
| + * |
| + * @param alpha opacity (alpha) value to use. |
| + */ |
| + public void setSearchBoxAlpha(float alpha) { |
| + mNewTabPageView.setSearchBoxAlpha(alpha); |
| } |
| /** |