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

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: Resolving code review comments and running git cl format 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 JNIEnv* env,
117 const OfflinePageItem& offline_page) const;
118
119 base::android::ScopedJavaLocalRef<jobject> CreateClientId( 116 base::android::ScopedJavaLocalRef<jobject> CreateClientId(
120 JNIEnv* env, 117 JNIEnv* env,
121 const ClientId& clientId) const; 118 const ClientId& clientId) const;
122 119
123 base::android::ScopedJavaGlobalRef<jobject> java_ref_; 120 base::android::ScopedJavaGlobalRef<jobject> java_ref_;
124 // Not owned. 121 // Not owned.
125 content::BrowserContext* browser_context_; 122 content::BrowserContext* browser_context_;
126 // Not owned. 123 // Not owned.
127 OfflinePageModel* offline_page_model_; 124 OfflinePageModel* offline_page_model_;
128 125
129 DISALLOW_COPY_AND_ASSIGN(OfflinePageBridge); 126 DISALLOW_COPY_AND_ASSIGN(OfflinePageBridge);
130 }; 127 };
131 128
132 bool RegisterOfflinePageBridge(JNIEnv* env); 129 bool RegisterOfflinePageBridge(JNIEnv* env);
133 130
134 } // namespace android 131 } // namespace android
135 } // namespace offline_pages 132 } // namespace offline_pages
136 133
137 #endif // CHROME_BROWSER_ANDROID_OFFLINE_PAGES_OFFLINE_PAGE_BRIDGE_H_ 134 #endif // CHROME_BROWSER_ANDROID_OFFLINE_PAGES_OFFLINE_PAGE_BRIDGE_H_
138 135
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698