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 3b2b316674e768045b0294beb2419c49d6b0aecd..2b358289bf634d9cfb7ff63e4e3fd6570fd7bb8e 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,30 @@ 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 box when scrolling. |
+ * |
+ * @param alpha opacity (alpha) value to use. |
+ */ |
+ public void setSearchBoxAlpha(float alpha) { |
+ mNewTabPageView.setSearchBoxAlpha(alpha); |
+ } |
+ |
+ /** |
+ * Updates the opacity of the search provider logo when scrolling. |
+ * |
+ * @param alpha opacity (alpha) value to use. |
+ */ |
+ public void setSearchProviderLogoAlpha(float alpha) { |
+ mNewTabPageView.setSearchProviderLogoAlpha(alpha); |
} |
/** |