OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 COMPONENTS_OFFLINE_ITEMS_COLLECTION_CORE_ANDROID_OFFLINE_CONTENT_AGGREGA
TOR_BRIDGE_H_ | 5 #ifndef COMPONENTS_OFFLINE_ITEMS_COLLECTION_CORE_ANDROID_OFFLINE_CONTENT_AGGREGA
TOR_BRIDGE_H_ |
6 #define COMPONENTS_OFFLINE_ITEMS_COLLECTION_CORE_ANDROID_OFFLINE_CONTENT_AGGREGA
TOR_BRIDGE_H_ | 6 #define COMPONENTS_OFFLINE_ITEMS_COLLECTION_CORE_ANDROID_OFFLINE_CONTENT_AGGREGA
TOR_BRIDGE_H_ |
7 | 7 |
8 #include "base/android/jni_android.h" | 8 #include "base/android/jni_android.h" |
9 #include "base/android/scoped_java_ref.h" | 9 #include "base/android/scoped_java_ref.h" |
10 #include "base/supports_user_data.h" | 10 #include "base/supports_user_data.h" |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 const base::android::JavaParamRef<jstring>& j_namespace, | 62 const base::android::JavaParamRef<jstring>& j_namespace, |
63 const base::android::JavaParamRef<jstring>& j_id); | 63 const base::android::JavaParamRef<jstring>& j_id); |
64 base::android::ScopedJavaLocalRef<jobject> GetItemById( | 64 base::android::ScopedJavaLocalRef<jobject> GetItemById( |
65 JNIEnv* env, | 65 JNIEnv* env, |
66 const base::android::JavaParamRef<jobject>& jobj, | 66 const base::android::JavaParamRef<jobject>& jobj, |
67 const base::android::JavaParamRef<jstring>& j_namespace, | 67 const base::android::JavaParamRef<jstring>& j_namespace, |
68 const base::android::JavaParamRef<jstring>& j_id); | 68 const base::android::JavaParamRef<jstring>& j_id); |
69 base::android::ScopedJavaLocalRef<jobject> GetAllItems( | 69 base::android::ScopedJavaLocalRef<jobject> GetAllItems( |
70 JNIEnv* env, | 70 JNIEnv* env, |
71 const base::android::JavaParamRef<jobject>& jobj); | 71 const base::android::JavaParamRef<jobject>& jobj); |
| 72 void GetVisualsForItem( |
| 73 JNIEnv* env, |
| 74 const base::android::JavaParamRef<jobject>& jobj, |
| 75 const base::android::JavaParamRef<jstring>& j_namespace, |
| 76 const base::android::JavaParamRef<jstring>& j_id, |
| 77 const base::android::JavaParamRef<jobject>& j_callback); |
72 | 78 |
73 private: | 79 private: |
74 OfflineContentAggregatorBridge(OfflineContentAggregator* aggregator); | 80 OfflineContentAggregatorBridge(OfflineContentAggregator* aggregator); |
75 | 81 |
76 // OfflineContentProvider::Observer implementation. | 82 // OfflineContentProvider::Observer implementation. |
77 void OnItemsAvailable(OfflineContentProvider* provider) override; | 83 void OnItemsAvailable(OfflineContentProvider* provider) override; |
78 void OnItemsAdded( | 84 void OnItemsAdded( |
79 const OfflineContentProvider::OfflineItemList& items) override; | 85 const OfflineContentProvider::OfflineItemList& items) override; |
80 void OnItemRemoved(const ContentId& id) override; | 86 void OnItemRemoved(const ContentId& id) override; |
81 void OnItemUpdated(const OfflineItem& item) override; | 87 void OnItemUpdated(const OfflineItem& item) override; |
82 | 88 |
83 // A reference to the Java counterpart of this class. See | 89 // A reference to the Java counterpart of this class. See |
84 // OfflineContentAggregatorBridge.java. | 90 // OfflineContentAggregatorBridge.java. |
85 base::android::ScopedJavaGlobalRef<jobject> java_ref_; | 91 base::android::ScopedJavaGlobalRef<jobject> java_ref_; |
86 | 92 |
87 OfflineContentAggregator* const aggregator_; | 93 OfflineContentAggregator* const aggregator_; |
88 | 94 |
89 DISALLOW_COPY_AND_ASSIGN(OfflineContentAggregatorBridge); | 95 DISALLOW_COPY_AND_ASSIGN(OfflineContentAggregatorBridge); |
90 }; | 96 }; |
91 | 97 |
92 } // namespace android | 98 } // namespace android |
93 } // namespace offline_items_collection | 99 } // namespace offline_items_collection |
94 | 100 |
95 #endif // COMPONENTS_OFFLINE_ITEMS_COLLECTION_CORE_ANDROID_OFFLINE_CONTENT_AGGR
EGATOR_BRIDGE_H_ | 101 #endif // COMPONENTS_OFFLINE_ITEMS_COLLECTION_CORE_ANDROID_OFFLINE_CONTENT_AGGR
EGATOR_BRIDGE_H_ |
OLD | NEW |