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

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

Issue 2232783002: Support action button to fetch more content suggestions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@snippetsbridge
Patch Set: Created 4 years, 4 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 base::android::ScopedJavaLocalRef<jobject> GetCategoryInfo( 44 base::android::ScopedJavaLocalRef<jobject> GetCategoryInfo(
45 JNIEnv* env, 45 JNIEnv* env,
46 const base::android::JavaParamRef<jobject>& obj, 46 const base::android::JavaParamRef<jobject>& obj,
47 jint category); 47 jint category);
48 48
49 base::android::ScopedJavaLocalRef<jobject> GetSuggestionsForCategory( 49 base::android::ScopedJavaLocalRef<jobject> GetSuggestionsForCategory(
50 JNIEnv* env, 50 JNIEnv* env,
51 const base::android::JavaParamRef<jobject>& obj, 51 const base::android::JavaParamRef<jobject>& obj,
52 jint category); 52 jint category);
53 53
54 // Triggers a fetch for new suggestions (over the network, for example) for
55 // the given |category|. This must be initiated by the user (e.g. by clicking
56 // the a "More" button).
Marc Treib 2016/08/10 09:40:30 nit: remove "a"
Philipp Keck 2016/08/10 13:14:46 Done.
57 void FetchMoreSuggestions(JNIEnv* env,
58 const base::android::JavaParamRef<jobject>& obj,
59 jint category);
60
54 void FetchSuggestionImage( 61 void FetchSuggestionImage(
55 JNIEnv* env, 62 JNIEnv* env,
56 const base::android::JavaParamRef<jobject>& obj, 63 const base::android::JavaParamRef<jobject>& obj,
57 const base::android::JavaParamRef<jstring>& suggestion_id, 64 const base::android::JavaParamRef<jstring>& suggestion_id,
58 const base::android::JavaParamRef<jobject>& j_callback); 65 const base::android::JavaParamRef<jobject>& j_callback);
59 66
60 void DismissSuggestion( 67 void DismissSuggestion(
61 JNIEnv* env, 68 JNIEnv* env,
62 const base::android::JavaParamRef<jobject>& obj, 69 const base::android::JavaParamRef<jobject>& obj,
63 const base::android::JavaParamRef<jstring>& suggestion_id); 70 const base::android::JavaParamRef<jstring>& suggestion_id);
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 102
96 // Used to notify the Java side when new snippets have been fetched. 103 // Used to notify the Java side when new snippets have been fetched.
97 base::android::ScopedJavaGlobalRef<jobject> observer_; 104 base::android::ScopedJavaGlobalRef<jobject> observer_;
98 105
99 base::WeakPtrFactory<NTPSnippetsBridge> weak_ptr_factory_; 106 base::WeakPtrFactory<NTPSnippetsBridge> weak_ptr_factory_;
100 107
101 DISALLOW_COPY_AND_ASSIGN(NTPSnippetsBridge); 108 DISALLOW_COPY_AND_ASSIGN(NTPSnippetsBridge);
102 }; 109 };
103 110
104 #endif // CHROME_BROWSER_ANDROID_NTP_NTP_SNIPPETS_BRIDGE_H_ 111 #endif // CHROME_BROWSER_ANDROID_NTP_NTP_SNIPPETS_BRIDGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698