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

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

Issue 2684973014: Only show Last N Pages in the UI when the corresponding tab is visible. (Closed)
Patch Set: Move impl out Created 3 years, 10 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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 JNIEnv* env, 118 JNIEnv* env,
119 const base::android::JavaParamRef<jobject>& obj, 119 const base::android::JavaParamRef<jobject>& obj,
120 const base::android::JavaParamRef<jobject>& j_callback_obj); 120 const base::android::JavaParamRef<jobject>& j_callback_obj);
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,
129 const base::android::JavaParamRef<jobject>& obj,
130 int tab_id);
131 void UnregisterRecentTab(JNIEnv* env,
132 const base::android::JavaParamRef<jobject>& obj,
133 int tab_id);
134
128 base::android::ScopedJavaGlobalRef<jobject> java_ref() { return java_ref_; } 135 base::android::ScopedJavaGlobalRef<jobject> java_ref() { return java_ref_; }
129 136
130 private: 137 private:
131 void NotifyIfDoneLoading() const; 138 void NotifyIfDoneLoading() const;
132 139
133 base::android::ScopedJavaLocalRef<jobject> CreateClientId( 140 base::android::ScopedJavaLocalRef<jobject> CreateClientId(
134 JNIEnv* env, 141 JNIEnv* env,
135 const ClientId& clientId) const; 142 const ClientId& clientId) const;
136 143
137 base::android::ScopedJavaGlobalRef<jobject> java_ref_; 144 base::android::ScopedJavaGlobalRef<jobject> java_ref_;
138 // Not owned. 145 // Not owned.
139 content::BrowserContext* browser_context_; 146 content::BrowserContext* browser_context_;
140 // Not owned. 147 // Not owned.
141 OfflinePageModel* offline_page_model_; 148 OfflinePageModel* offline_page_model_;
142 149
143 DISALLOW_COPY_AND_ASSIGN(OfflinePageBridge); 150 DISALLOW_COPY_AND_ASSIGN(OfflinePageBridge);
144 }; 151 };
145 152
146 bool RegisterOfflinePageBridge(JNIEnv* env); 153 bool RegisterOfflinePageBridge(JNIEnv* env);
147 154
148 } // namespace android 155 } // namespace android
149 } // namespace offline_pages 156 } // namespace offline_pages
150 157
151 #endif // CHROME_BROWSER_ANDROID_OFFLINE_PAGES_OFFLINE_PAGE_BRIDGE_H_ 158 #endif // CHROME_BROWSER_ANDROID_OFFLINE_PAGES_OFFLINE_PAGE_BRIDGE_H_
152 159
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698