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

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

Issue 1969233002: [OfflinePages] Make website settings popup rely on asynchronous API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comment response Created 4 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 base::android::ScopedJavaLocalRef<jobject> GetPageByOfflineId( 64 base::android::ScopedJavaLocalRef<jobject> GetPageByOfflineId(
65 JNIEnv* env, 65 JNIEnv* env,
66 const base::android::JavaParamRef<jobject>& obj, 66 const base::android::JavaParamRef<jobject>& obj,
67 jlong offline_id); 67 jlong offline_id);
68 68
69 base::android::ScopedJavaLocalRef<jobject> GetBestPageForOnlineURL( 69 base::android::ScopedJavaLocalRef<jobject> GetBestPageForOnlineURL(
70 JNIEnv* env, 70 JNIEnv* env,
71 const base::android::JavaParamRef<jobject>& obj, 71 const base::android::JavaParamRef<jobject>& obj,
72 const base::android::JavaParamRef<jstring>& online_url); 72 const base::android::JavaParamRef<jstring>& online_url);
73 73
74 base::android::ScopedJavaLocalRef<jobject> GetPageByOfflineUrl( 74 void GetPageByOfflineUrl(
75 JNIEnv* env, 75 JNIEnv* env,
76 const base::android::JavaParamRef<jobject>& obj, 76 const base::android::JavaParamRef<jobject>& obj,
77 const base::android::JavaParamRef<jstring>& j_offline_url); 77 const base::android::JavaParamRef<jstring>& j_offline_url,
78 const base::android::JavaParamRef<jobject>& j_callback_obj);
78 79
79 void SavePage( 80 void SavePage(
80 JNIEnv* env, 81 JNIEnv* env,
81 const base::android::JavaParamRef<jobject>& obj, 82 const base::android::JavaParamRef<jobject>& obj,
82 const base::android::JavaParamRef<jobject>& j_callback_obj, 83 const base::android::JavaParamRef<jobject>& j_callback_obj,
83 const base::android::JavaParamRef<jobject>& j_web_contents, 84 const base::android::JavaParamRef<jobject>& j_web_contents,
84 const base::android::JavaParamRef<jstring>& j_namespace, 85 const base::android::JavaParamRef<jstring>& j_namespace,
85 const base::android::JavaParamRef<jstring>& j_client_id); 86 const base::android::JavaParamRef<jstring>& j_client_id);
86 87
87 void SavePageLater( 88 void SavePageLater(
(...skipping 17 matching lines...) Expand all
105 const base::android::JavaParamRef<jobject>& obj, 106 const base::android::JavaParamRef<jobject>& obj,
106 jlong total_space_bytes, 107 jlong total_space_bytes,
107 jlong free_space_bytes, 108 jlong free_space_bytes,
108 jboolean reporting_after_delete); 109 jboolean reporting_after_delete);
109 110
110 base::android::ScopedJavaGlobalRef<jobject> java_ref() { return java_ref_; } 111 base::android::ScopedJavaGlobalRef<jobject> java_ref() { return java_ref_; }
111 112
112 private: 113 private:
113 void NotifyIfDoneLoading() const; 114 void NotifyIfDoneLoading() const;
114 115
115 base::android::ScopedJavaLocalRef<jobject> CreateOfflinePageItem( 116 base::android::ScopedJavaLocalRef<jobject> CreateOfflinePageItem(
fgorski 2016/05/17 04:12:25 did you mean to remove this? I think you are delet
chili 2016/05/17 17:53:30 Done.
116 JNIEnv* env, 117 JNIEnv* env,
117 const OfflinePageItem& offline_page) const; 118 const OfflinePageItem& offline_page) const;
118 119
119 base::android::ScopedJavaLocalRef<jobject> CreateClientId( 120 base::android::ScopedJavaLocalRef<jobject> CreateClientId(
120 JNIEnv* env, 121 JNIEnv* env,
121 const ClientId& clientId) const; 122 const ClientId& clientId) const;
122 123
123 base::android::ScopedJavaGlobalRef<jobject> java_ref_; 124 base::android::ScopedJavaGlobalRef<jobject> java_ref_;
124 // Not owned. 125 // Not owned.
125 content::BrowserContext* browser_context_; 126 content::BrowserContext* browser_context_;
126 // Not owned. 127 // Not owned.
127 OfflinePageModel* offline_page_model_; 128 OfflinePageModel* offline_page_model_;
128 129
129 DISALLOW_COPY_AND_ASSIGN(OfflinePageBridge); 130 DISALLOW_COPY_AND_ASSIGN(OfflinePageBridge);
130 }; 131 };
131 132
132 bool RegisterOfflinePageBridge(JNIEnv* env); 133 bool RegisterOfflinePageBridge(JNIEnv* env);
133 134
134 } // namespace android 135 } // namespace android
135 } // namespace offline_pages 136 } // namespace offline_pages
136 137
137 #endif // CHROME_BROWSER_ANDROID_OFFLINE_PAGES_OFFLINE_PAGE_BRIDGE_H_ 138 #endif // CHROME_BROWSER_ANDROID_OFFLINE_PAGES_OFFLINE_PAGE_BRIDGE_H_
138 139
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698