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

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

Issue 2599743002: Trigger the Snippets Scheduler when Resuming Activities (Closed)
Patch Set: Rebase 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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 jint j_category_id, 123 jint j_category_id,
124 jint position); 124 jint position);
125 125
126 void OnMoreButtonClicked(JNIEnv* env, 126 void OnMoreButtonClicked(JNIEnv* env,
127 const base::android::JavaParamRef<jobject>& obj, 127 const base::android::JavaParamRef<jobject>& obj,
128 jint j_category_id, 128 jint j_category_id,
129 jint position); 129 jint position);
130 130
131 void OnNTPInitialized(JNIEnv* env, 131 void OnNTPInitialized(JNIEnv* env,
132 const base::android::JavaParamRef<jobject>& obj); 132 const base::android::JavaParamRef<jobject>& obj);
133 void OnColdStart(JNIEnv* env,
134 const base::android::JavaParamRef<jobject>& obj);
135 void OnActivityWarmResumed(JNIEnv* env,
136 const base::android::JavaParamRef<jobject>& obj);
133 137
134 static bool Register(JNIEnv* env); 138 static bool Register(JNIEnv* env);
135 139
136 private: 140 private:
137 ~NTPSnippetsBridge() override; 141 ~NTPSnippetsBridge() override;
138 142
139 // ContentSuggestionsService::Observer overrides 143 // ContentSuggestionsService::Observer overrides
140 void OnNewSuggestions(ntp_snippets::Category category) override; 144 void OnNewSuggestions(ntp_snippets::Category category) override;
141 void OnCategoryStatusChanged( 145 void OnCategoryStatusChanged(
142 ntp_snippets::Category category, 146 ntp_snippets::Category category,
(...skipping 20 matching lines...) Expand all
163 167
164 // The Java SnippetsBridge. 168 // The Java SnippetsBridge.
165 base::android::ScopedJavaGlobalRef<jobject> bridge_; 169 base::android::ScopedJavaGlobalRef<jobject> bridge_;
166 170
167 base::WeakPtrFactory<NTPSnippetsBridge> weak_ptr_factory_; 171 base::WeakPtrFactory<NTPSnippetsBridge> weak_ptr_factory_;
168 172
169 DISALLOW_COPY_AND_ASSIGN(NTPSnippetsBridge); 173 DISALLOW_COPY_AND_ASSIGN(NTPSnippetsBridge);
170 }; 174 };
171 175
172 #endif // CHROME_BROWSER_ANDROID_NTP_NTP_SNIPPETS_BRIDGE_H_ 176 #endif // CHROME_BROWSER_ANDROID_NTP_NTP_SNIPPETS_BRIDGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698