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

Side by Side Diff: chrome/browser/android/ntp/ntp_snippets_bridge.h

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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_ANDROID_NTP_NTP_SNIPPETS_BRIDGE_H_ 5 #ifndef CHROME_BROWSER_ANDROID_NTP_NTP_SNIPPETS_BRIDGE_H_
6 #define CHROME_BROWSER_ANDROID_NTP_NTP_SNIPPETS_BRIDGE_H_ 6 #define CHROME_BROWSER_ANDROID_NTP_NTP_SNIPPETS_BRIDGE_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 9
10 #include "base/android/scoped_java_ref.h" 10 #include "base/android/scoped_java_ref.h"
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 jint j_category_id, 126 jint j_category_id,
127 jint position); 127 jint position);
128 128
129 void OnMoreButtonClicked(JNIEnv* env, 129 void OnMoreButtonClicked(JNIEnv* env,
130 const base::android::JavaParamRef<jobject>& obj, 130 const base::android::JavaParamRef<jobject>& obj,
131 jint j_category_id, 131 jint j_category_id,
132 jint position); 132 jint position);
133 133
134 void OnNTPInitialized(JNIEnv* env, 134 void OnNTPInitialized(JNIEnv* env,
135 const base::android::JavaParamRef<jobject>& obj); 135 const base::android::JavaParamRef<jobject>& obj);
136 void OnColdStart(JNIEnv* env,
137 const base::android::JavaParamRef<jobject>& obj);
138 void OnWarmStartedActivityResumed(
139 JNIEnv* env,
140 const base::android::JavaParamRef<jobject>& obj);
136 141
137 static bool Register(JNIEnv* env); 142 static bool Register(JNIEnv* env);
138 143
139 private: 144 private:
140 ~NTPSnippetsBridge() override; 145 ~NTPSnippetsBridge() override;
141 146
142 // ContentSuggestionsService::Observer overrides 147 // ContentSuggestionsService::Observer overrides
143 void OnNewSuggestions(ntp_snippets::Category category) override; 148 void OnNewSuggestions(ntp_snippets::Category category) override;
144 void OnCategoryStatusChanged( 149 void OnCategoryStatusChanged(
145 ntp_snippets::Category category, 150 ntp_snippets::Category category,
(...skipping 20 matching lines...) Expand all
166 171
167 // Used to notify the Java side when new snippets have been fetched. 172 // Used to notify the Java side when new snippets have been fetched.
168 base::android::ScopedJavaGlobalRef<jobject> observer_; 173 base::android::ScopedJavaGlobalRef<jobject> observer_;
169 174
170 base::WeakPtrFactory<NTPSnippetsBridge> weak_ptr_factory_; 175 base::WeakPtrFactory<NTPSnippetsBridge> weak_ptr_factory_;
171 176
172 DISALLOW_COPY_AND_ASSIGN(NTPSnippetsBridge); 177 DISALLOW_COPY_AND_ASSIGN(NTPSnippetsBridge);
173 }; 178 };
174 179
175 #endif // CHROME_BROWSER_ANDROID_NTP_NTP_SNIPPETS_BRIDGE_H_ 180 #endif // CHROME_BROWSER_ANDROID_NTP_NTP_SNIPPETS_BRIDGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698