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 // Checks if the URL has been visited. The callback will not be called | 78 // Checks if the URL has been visited. The callback will not be called |
75 // synchronously. | 79 // synchronously. |
76 void GetURLVisited(JNIEnv* env, | 80 void GetURLVisited(JNIEnv* env, |
77 const base::android::JavaParamRef<jobject>& obj, | 81 const base::android::JavaParamRef<jobject>& obj, |
78 const base::android::JavaParamRef<jobject>& callback, | 82 const base::android::JavaParamRef<jobject>& callback, |
79 const base::android::JavaParamRef<jstring>& jurl); | 83 const base::android::JavaParamRef<jstring>& jurl); |
80 | 84 |
81 void OnPageShown( | 85 void OnPageShown( |
82 JNIEnv* env, | 86 JNIEnv* env, |
83 const base::android::JavaParamRef<jobject>& obj, | 87 const base::android::JavaParamRef<jobject>& obj, |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 | 152 |
149 // Used to notify the Java side when new snippets have been fetched. | 153 // Used to notify the Java side when new snippets have been fetched. |
150 base::android::ScopedJavaGlobalRef<jobject> observer_; | 154 base::android::ScopedJavaGlobalRef<jobject> observer_; |
151 | 155 |
152 base::WeakPtrFactory<NTPSnippetsBridge> weak_ptr_factory_; | 156 base::WeakPtrFactory<NTPSnippetsBridge> weak_ptr_factory_; |
153 | 157 |
154 DISALLOW_COPY_AND_ASSIGN(NTPSnippetsBridge); | 158 DISALLOW_COPY_AND_ASSIGN(NTPSnippetsBridge); |
155 }; | 159 }; |
156 | 160 |
157 #endif // CHROME_BROWSER_ANDROID_NTP_NTP_SNIPPETS_BRIDGE_H_ | 161 #endif // CHROME_BROWSER_ANDROID_NTP_NTP_SNIPPETS_BRIDGE_H_ |
OLD | NEW |