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 7055300b8498f71c591a6ad65331f4222e21aa40..78724b93737047006a22abe666f444dc58db15f0 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; |
@@ -650,16 +651,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. |
*/ |
- 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); |
} |
/** |