Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 Loading... | |
| 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_ |
| OLD | NEW |