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

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

Issue 2557363002: [NTP Snippets] Refactor background scheduling for remote suggestions (Closed)
Patch Set: Fixing the last changes :) Created 3 years, 12 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 jint j_category_id, 62 jint j_category_id,
63 const base::android::JavaParamRef<jstring>& id_within_category, 63 const base::android::JavaParamRef<jstring>& id_within_category,
64 const base::android::JavaParamRef<jobject>& j_callback); 64 const base::android::JavaParamRef<jobject>& j_callback);
65 65
66 void Fetch( 66 void Fetch(
67 JNIEnv* env, 67 JNIEnv* env,
68 const base::android::JavaParamRef<jobject>& obj, 68 const base::android::JavaParamRef<jobject>& obj,
69 jint j_category_id, 69 jint j_category_id,
70 const base::android::JavaParamRef<jobjectArray>& j_displayed_suggestions); 70 const base::android::JavaParamRef<jobjectArray>& j_displayed_suggestions);
71 71
72 void ReloadSuggestions(
73 JNIEnv* env,
74 const base::android::JavaParamRef<jobject>& obj);
75
72 void DismissSuggestion( 76 void DismissSuggestion(
73 JNIEnv* env, 77 JNIEnv* env,
74 const base::android::JavaParamRef<jobject>& obj, 78 const base::android::JavaParamRef<jobject>& obj,
75 const base::android::JavaParamRef<jstring>& jurl, 79 const base::android::JavaParamRef<jstring>& jurl,
76 jint global_position, 80 jint global_position,
77 jint j_category_id, 81 jint j_category_id,
78 jint category_position, 82 jint category_position,
79 const base::android::JavaParamRef<jstring>& id_within_category); 83 const base::android::JavaParamRef<jstring>& id_within_category);
80 84
81 void DismissCategory(JNIEnv* env, 85 void DismissCategory(JNIEnv* env,
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 163
160 // Used to notify the Java side when new snippets have been fetched. 164 // Used to notify the Java side when new snippets have been fetched.
161 base::android::ScopedJavaGlobalRef<jobject> observer_; 165 base::android::ScopedJavaGlobalRef<jobject> observer_;
162 166
163 base::WeakPtrFactory<NTPSnippetsBridge> weak_ptr_factory_; 167 base::WeakPtrFactory<NTPSnippetsBridge> weak_ptr_factory_;
164 168
165 DISALLOW_COPY_AND_ASSIGN(NTPSnippetsBridge); 169 DISALLOW_COPY_AND_ASSIGN(NTPSnippetsBridge);
166 }; 170 };
167 171
168 #endif // CHROME_BROWSER_ANDROID_NTP_NTP_SNIPPETS_BRIDGE_H_ 172 #endif // CHROME_BROWSER_ANDROID_NTP_NTP_SNIPPETS_BRIDGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698