| 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 742867deb4364f82dfc7e179a42ca879b2224378..3ae73cf8ae0eacf84e4b4f31bf5f3735697774c8 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
|
| @@ -170,6 +170,11 @@
|
| boolean isVoiceSearchEnabled();
|
|
|
| /**
|
| + * @return Whether the URL bar is currently focused.
|
| + */
|
| + boolean isUrlBarFocused();
|
| +
|
| + /**
|
| * Focuses the URL bar when the user taps the fakebox, types in the fakebox, or pastes text
|
| * into the fakebox.
|
| *
|
| @@ -715,6 +720,13 @@ public void setFakeboxDelegate(FakeboxDelegate fakeboxDelegate) {
|
| mFakeboxDelegate = fakeboxDelegate;
|
| if (mFakeboxDelegate != null) {
|
| mNewTabPageView.updateVoiceSearchButtonVisibility();
|
| +
|
| + // The toolbar can't get the reference to the native page until its initialization is
|
| + // finished, so we can't cache it here and transfer it to the view later. We pull that
|
| + // state from the location bar when we get a reference to it as a workaround.
|
| + if (fakeboxDelegate.isUrlBarFocused()) {
|
| + mNewTabPageView.setUrlFocusChangeAnimationPercent(1f);
|
| + }
|
| }
|
| }
|
|
|
|
|