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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 const base::android::JavaParamRef<jstring>& jurl, | 64 const base::android::JavaParamRef<jstring>& jurl, |
65 jint global_position, | 65 jint global_position, |
66 jint category, | 66 jint category, |
67 jint category_position, | 67 jint category_position, |
68 const base::android::JavaParamRef<jstring>& id_within_category); | 68 const base::android::JavaParamRef<jstring>& id_within_category); |
69 | 69 |
70 void DismissCategory(JNIEnv* env, | 70 void DismissCategory(JNIEnv* env, |
71 const base::android::JavaParamRef<jobject>& obj, | 71 const base::android::JavaParamRef<jobject>& obj, |
72 jint category); | 72 jint category); |
73 | 73 |
| 74 void RestoreDismissedCategories( |
| 75 JNIEnv* env, |
| 76 const base::android::JavaParamRef<jobject>& obj); |
| 77 |
74 void OnPageShown( | 78 void OnPageShown( |
75 JNIEnv* env, | 79 JNIEnv* env, |
76 const base::android::JavaParamRef<jobject>& obj, | 80 const base::android::JavaParamRef<jobject>& obj, |
77 const base::android::JavaParamRef<jintArray>& jcategories, | 81 const base::android::JavaParamRef<jintArray>& jcategories, |
78 const base::android::JavaParamRef<jintArray>& jsuggestions_per_category); | 82 const base::android::JavaParamRef<jintArray>& jsuggestions_per_category); |
79 | 83 |
80 void OnSuggestionShown(JNIEnv* env, | 84 void OnSuggestionShown(JNIEnv* env, |
81 const base::android::JavaParamRef<jobject>& obj, | 85 const base::android::JavaParamRef<jobject>& obj, |
82 jint global_position, | 86 jint global_position, |
83 jint category, | 87 jint category, |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 | 145 |
142 // Used to notify the Java side when new snippets have been fetched. | 146 // Used to notify the Java side when new snippets have been fetched. |
143 base::android::ScopedJavaGlobalRef<jobject> observer_; | 147 base::android::ScopedJavaGlobalRef<jobject> observer_; |
144 | 148 |
145 base::WeakPtrFactory<NTPSnippetsBridge> weak_ptr_factory_; | 149 base::WeakPtrFactory<NTPSnippetsBridge> weak_ptr_factory_; |
146 | 150 |
147 DISALLOW_COPY_AND_ASSIGN(NTPSnippetsBridge); | 151 DISALLOW_COPY_AND_ASSIGN(NTPSnippetsBridge); |
148 }; | 152 }; |
149 | 153 |
150 #endif // CHROME_BROWSER_ANDROID_NTP_NTP_SNIPPETS_BRIDGE_H_ | 154 #endif // CHROME_BROWSER_ANDROID_NTP_NTP_SNIPPETS_BRIDGE_H_ |
OLD | NEW |