Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(606)

Side by Side Diff: chrome/browser/android/offline_pages/offline_page_bridge.h

Issue 2838773002: Move offline related functions from Tab to OfflinePageUtils (Closed)
Patch Set: Fix tests Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 void ScheduleDownload( 137 void ScheduleDownload(
138 JNIEnv* env, 138 JNIEnv* env,
139 const base::android::JavaParamRef<jobject>& obj, 139 const base::android::JavaParamRef<jobject>& obj,
140 const base::android::JavaParamRef<jobject>& j_web_contents, 140 const base::android::JavaParamRef<jobject>& j_web_contents,
141 const base::android::JavaParamRef<jstring>& j_namespace, 141 const base::android::JavaParamRef<jstring>& j_namespace,
142 const base::android::JavaParamRef<jstring>& j_url, 142 const base::android::JavaParamRef<jstring>& j_url,
143 int ui_action); 143 int ui_action);
144 144
145 base::android::ScopedJavaGlobalRef<jobject> java_ref() { return java_ref_; } 145 base::android::ScopedJavaGlobalRef<jobject> java_ref() { return java_ref_; }
146 146
147 jboolean IsOfflinePage(
148 JNIEnv* env,
149 const base::android::JavaParamRef<jobject>& obj,
150 const base::android::JavaParamRef<jobject>& j_web_contents);
151
152 base::android::ScopedJavaLocalRef<jobject> GetOfflinePage(
153 JNIEnv* env,
154 const base::android::JavaParamRef<jobject>& obj,
155 const base::android::JavaParamRef<jobject>& j_web_contents);
156
147 private: 157 private:
148 void NotifyIfDoneLoading() const; 158 void NotifyIfDoneLoading() const;
149 159
150 base::android::ScopedJavaLocalRef<jobject> CreateClientId( 160 base::android::ScopedJavaLocalRef<jobject> CreateClientId(
151 JNIEnv* env, 161 JNIEnv* env,
152 const ClientId& clientId) const; 162 const ClientId& clientId) const;
153 163
154 base::android::ScopedJavaGlobalRef<jobject> java_ref_; 164 base::android::ScopedJavaGlobalRef<jobject> java_ref_;
155 // Not owned. 165 // Not owned.
156 content::BrowserContext* browser_context_; 166 content::BrowserContext* browser_context_;
157 // Not owned. 167 // Not owned.
158 OfflinePageModel* offline_page_model_; 168 OfflinePageModel* offline_page_model_;
159 169
160 DISALLOW_COPY_AND_ASSIGN(OfflinePageBridge); 170 DISALLOW_COPY_AND_ASSIGN(OfflinePageBridge);
161 }; 171 };
162 172
163 bool RegisterOfflinePageBridge(JNIEnv* env); 173 bool RegisterOfflinePageBridge(JNIEnv* env);
164 174
165 } // namespace android 175 } // namespace android
166 } // namespace offline_pages 176 } // namespace offline_pages
167 177
168 #endif // CHROME_BROWSER_ANDROID_OFFLINE_PAGES_OFFLINE_PAGE_BRIDGE_H_ 178 #endif // CHROME_BROWSER_ANDROID_OFFLINE_PAGES_OFFLINE_PAGE_BRIDGE_H_
169 179
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698