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

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

Issue 2599743002: Trigger the Snippets Scheduler when Resuming Activities (Closed)
Patch Set: Remove unnecessary "= false". 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 OnActivityWarmResumed(JNIEnv* env,
139 const base::android::JavaParamRef<jobject>& obj);
136 140
137 static bool Register(JNIEnv* env); 141 static bool Register(JNIEnv* env);
138 142
139 private: 143 private:
140 ~NTPSnippetsBridge() override; 144 ~NTPSnippetsBridge() override;
141 145
142 // ContentSuggestionsService::Observer overrides 146 // ContentSuggestionsService::Observer overrides
143 void OnNewSuggestions(ntp_snippets::Category category) override; 147 void OnNewSuggestions(ntp_snippets::Category category) override;
144 void OnCategoryStatusChanged( 148 void OnCategoryStatusChanged(
145 ntp_snippets::Category category, 149 ntp_snippets::Category category,
(...skipping 20 matching lines...) Expand all
166 170
167 // Used to notify the Java side when new snippets have been fetched. 171 // Used to notify the Java side when new snippets have been fetched.
168 base::android::ScopedJavaGlobalRef<jobject> observer_; 172 base::android::ScopedJavaGlobalRef<jobject> observer_;
169 173
170 base::WeakPtrFactory<NTPSnippetsBridge> weak_ptr_factory_; 174 base::WeakPtrFactory<NTPSnippetsBridge> weak_ptr_factory_;
171 175
172 DISALLOW_COPY_AND_ASSIGN(NTPSnippetsBridge); 176 DISALLOW_COPY_AND_ASSIGN(NTPSnippetsBridge);
173 }; 177 };
174 178
175 #endif // CHROME_BROWSER_ANDROID_NTP_NTP_SNIPPETS_BRIDGE_H_ 179 #endif // CHROME_BROWSER_ANDROID_NTP_NTP_SNIPPETS_BRIDGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698