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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPage.java

Issue 2134663002: Use only toolbar to transition from fakebox to real omnibox. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review Created 4 years, 5 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/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);
}
/**
« no previous file with comments | « chrome/android/java/res/values/dimens.xml ('k') | chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageView.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698