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

Unified Diff: chrome/browser/android/ntp/ntp_snippets_bridge.cc

Issue 2599743002: Trigger the Snippets Scheduler when Resuming Activities (Closed)
Patch Set: Two separate signals instead of boolean value. Created 3 years, 11 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/browser/android/ntp/ntp_snippets_bridge.cc
diff --git a/chrome/browser/android/ntp/ntp_snippets_bridge.cc b/chrome/browser/android/ntp/ntp_snippets_bridge.cc
index 939435eba8b2a60d840dfae30e1cad96a0af49e6..3696ff0fdef49ec77b90a35a95131bbeaae036c3 100644
--- a/chrome/browser/android/ntp/ntp_snippets_bridge.cc
+++ b/chrome/browser/android/ntp/ntp_snippets_bridge.cc
@@ -402,6 +402,20 @@ void NTPSnippetsBridge::OnNTPInitialized(
content_suggestions_service_->remote_suggestions_scheduler()->OnNTPOpened();
}
+void NTPSnippetsBridge::OnColdStart(
+ JNIEnv* env,
+ const base::android::JavaParamRef<jobject>& obj) {
+ content_suggestions_service_->remote_suggestions_scheduler()
+ ->OnBrowserColdStart();
+}
+
+void NTPSnippetsBridge::OnWarmStartedActivityResumed(
+ JNIEnv* env,
+ const base::android::JavaParamRef<jobject>& obj) {
+ content_suggestions_service_->remote_suggestions_scheduler()
+ ->OnBrowserForegrounded();
+}
+
NTPSnippetsBridge::~NTPSnippetsBridge() {}
void NTPSnippetsBridge::OnNewSuggestions(Category category) {

Powered by Google App Engine
This is Rietveld 408576698