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

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

Issue 2400163002: Tentative fix for scroll event related crashes on the NTP (Closed)
Patch Set: address comment Created 4 years, 2 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
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageView.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 e9354ec17305f271b238ae24c4afe5433f484b20..dbdf31da01aee4fb232b732cb839c23e26c18f20 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
@@ -199,6 +199,11 @@
* just tapped the fakebox.
*/
void requestUrlFocusFromFakebox(String pastedText);
+
+ /**
+ * @return whether the provided native page is the one currently displayed to the user.
+ */
+ boolean isCurrentPage(NativePage nativePage);
}
/**
@@ -661,6 +666,13 @@ public void registerSignInStateObserver(SignInStateObserver signInStateObserver)
mSignInStateObserver = signInStateObserver;
SigninManager.get(mActivity).addSignInStateObserver(mSignInStateObserver);
}
+
+ @Override
+ public boolean isCurrentPage() {
+ if (mIsDestroyed) return false;
+ if (mFakeboxDelegate == null) return false;
+ return mFakeboxDelegate.isCurrentPage(NewTabPage.this);
+ }
};
/**
« no previous file with comments | « no previous file | 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