| 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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 | 121 |
| 122 void RemoveRequestsFromQueue( | 122 void RemoveRequestsFromQueue( |
| 123 JNIEnv* env, | 123 JNIEnv* env, |
| 124 const base::android::JavaParamRef<jobject>& obj, | 124 const base::android::JavaParamRef<jobject>& obj, |
| 125 const base::android::JavaParamRef<jlongArray>& j_request_ids_array, | 125 const base::android::JavaParamRef<jlongArray>& j_request_ids_array, |
| 126 const base::android::JavaParamRef<jobject>& j_callback_obj); | 126 const base::android::JavaParamRef<jobject>& j_callback_obj); |
| 127 | 127 |
| 128 void RegisterRecentTab(JNIEnv* env, | 128 void RegisterRecentTab(JNIEnv* env, |
| 129 const base::android::JavaParamRef<jobject>& obj, | 129 const base::android::JavaParamRef<jobject>& obj, |
| 130 int tab_id); | 130 int tab_id); |
| 131 void WillCloseTab(JNIEnv* env, |
| 132 const base::android::JavaParamRef<jobject>& obj, |
| 133 const base::android::JavaParamRef<jobject>& j_web_contents); |
| 131 void UnregisterRecentTab(JNIEnv* env, | 134 void UnregisterRecentTab(JNIEnv* env, |
| 132 const base::android::JavaParamRef<jobject>& obj, | 135 const base::android::JavaParamRef<jobject>& obj, |
| 133 int tab_id); | 136 int tab_id); |
| 134 | 137 |
| 135 base::android::ScopedJavaGlobalRef<jobject> java_ref() { return java_ref_; } | 138 base::android::ScopedJavaGlobalRef<jobject> java_ref() { return java_ref_; } |
| 136 | 139 |
| 137 private: | 140 private: |
| 138 void NotifyIfDoneLoading() const; | 141 void NotifyIfDoneLoading() const; |
| 139 | 142 |
| 140 base::android::ScopedJavaLocalRef<jobject> CreateClientId( | 143 base::android::ScopedJavaLocalRef<jobject> CreateClientId( |
| 141 JNIEnv* env, | 144 JNIEnv* env, |
| 142 const ClientId& clientId) const; | 145 const ClientId& clientId) const; |
| 143 | 146 |
| 144 base::android::ScopedJavaGlobalRef<jobject> java_ref_; | 147 base::android::ScopedJavaGlobalRef<jobject> java_ref_; |
| 145 // Not owned. | 148 // Not owned. |
| 146 content::BrowserContext* browser_context_; | 149 content::BrowserContext* browser_context_; |
| 147 // Not owned. | 150 // Not owned. |
| 148 OfflinePageModel* offline_page_model_; | 151 OfflinePageModel* offline_page_model_; |
| 149 | 152 |
| 150 DISALLOW_COPY_AND_ASSIGN(OfflinePageBridge); | 153 DISALLOW_COPY_AND_ASSIGN(OfflinePageBridge); |
| 151 }; | 154 }; |
| 152 | 155 |
| 153 bool RegisterOfflinePageBridge(JNIEnv* env); | 156 bool RegisterOfflinePageBridge(JNIEnv* env); |
| 154 | 157 |
| 155 } // namespace android | 158 } // namespace android |
| 156 } // namespace offline_pages | 159 } // namespace offline_pages |
| 157 | 160 |
| 158 #endif // CHROME_BROWSER_ANDROID_OFFLINE_PAGES_OFFLINE_PAGE_BRIDGE_H_ | 161 #endif // CHROME_BROWSER_ANDROID_OFFLINE_PAGES_OFFLINE_PAGE_BRIDGE_H_ |
| 159 | 162 |
| OLD | NEW |