OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_OFFLINE_PAGES_OFFLINE_PAGE_BRIDGE_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_OFFLINE_PAGES_OFFLINE_PAGE_BRIDGE_H_ |
6 #define CHROME_BROWSER_ANDROID_OFFLINE_PAGES_OFFLINE_PAGE_BRIDGE_H_ | 6 #define CHROME_BROWSER_ANDROID_OFFLINE_PAGES_OFFLINE_PAGE_BRIDGE_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/android/jni_android.h" | 10 #include "base/android/jni_android.h" |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 void DeletePages( | 71 void DeletePages( |
72 JNIEnv* env, | 72 JNIEnv* env, |
73 const base::android::JavaParamRef<jobject>& obj, | 73 const base::android::JavaParamRef<jobject>& obj, |
74 const base::android::JavaParamRef<jobject>& j_callback_obj, | 74 const base::android::JavaParamRef<jobject>& j_callback_obj, |
75 const base::android::JavaParamRef<jlongArray>& bookmark_ids_array); | 75 const base::android::JavaParamRef<jlongArray>& bookmark_ids_array); |
76 | 76 |
77 void CheckMetadataConsistency( | 77 void CheckMetadataConsistency( |
78 JNIEnv* env, | 78 JNIEnv* env, |
79 const base::android::JavaParamRef<jobject>& obj); | 79 const base::android::JavaParamRef<jobject>& obj); |
80 | 80 |
| 81 base::android::ScopedJavaLocalRef<jstring> GetOfflineUrlForOnlineUrl( |
| 82 JNIEnv* env, |
| 83 const base::android::JavaParamRef<jobject>& obj, |
| 84 const base::android::JavaParamRef<jstring>& j_online_url); |
| 85 |
| 86 jboolean IsOfflinePageUrl( |
| 87 JNIEnv* env, |
| 88 const base::android::JavaParamRef<jobject>& obj, |
| 89 const base::android::JavaParamRef<jstring>& j_offline_url); |
| 90 |
81 private: | 91 private: |
82 void NotifyIfDoneLoading() const; | 92 void NotifyIfDoneLoading() const; |
83 | 93 |
84 base::android::ScopedJavaLocalRef<jobject> CreateOfflinePageItem( | 94 base::android::ScopedJavaLocalRef<jobject> CreateOfflinePageItem( |
85 JNIEnv* env, | 95 JNIEnv* env, |
86 const OfflinePageItem& offline_page) const; | 96 const OfflinePageItem& offline_page) const; |
87 | 97 |
88 JavaObjectWeakGlobalRef weak_java_ref_; | 98 JavaObjectWeakGlobalRef weak_java_ref_; |
89 // Not owned. | 99 // Not owned. |
| 100 content::BrowserContext* browser_context_; |
| 101 // Not owned. |
90 OfflinePageModel* offline_page_model_; | 102 OfflinePageModel* offline_page_model_; |
91 | 103 |
92 DISALLOW_COPY_AND_ASSIGN(OfflinePageBridge); | 104 DISALLOW_COPY_AND_ASSIGN(OfflinePageBridge); |
93 }; | 105 }; |
94 | 106 |
95 bool RegisterOfflinePageBridge(JNIEnv* env); | 107 bool RegisterOfflinePageBridge(JNIEnv* env); |
96 | 108 |
97 } // namespace android | 109 } // namespace android |
98 } // namespace offline_pages | 110 } // namespace offline_pages |
99 | 111 |
100 #endif // CHROME_BROWSER_ANDROID_OFFLINE_PAGES_OFFLINE_PAGE_BRIDGE_H_ | 112 #endif // CHROME_BROWSER_ANDROID_OFFLINE_PAGES_OFFLINE_PAGE_BRIDGE_H_ |
101 | 113 |
OLD | NEW |