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

Unified Diff: chrome/browser/android/recently_closed_tabs_bridge.h

Issue 2610143002: Add RecentTabsPageTest (Closed)
Patch Set: Undo the prefs changes. Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/android/recently_closed_tabs_bridge.h
diff --git a/chrome/browser/android/recently_closed_tabs_bridge.h b/chrome/browser/android/recently_closed_tabs_bridge.h
index bbaff1b9407f38981511b0baeb16ac5407fc737b..688297c20e04c96ee5eb2771d164a1a96e9f59cf 100644
--- a/chrome/browser/android/recently_closed_tabs_bridge.h
+++ b/chrome/browser/android/recently_closed_tabs_bridge.h
@@ -17,13 +17,10 @@ class Profile;
// Provides the list of recently closed tabs to Java.
class RecentlyClosedTabsBridge : public sessions::TabRestoreServiceObserver {
public:
- explicit RecentlyClosedTabsBridge(Profile* profile);
+ RecentlyClosedTabsBridge(const base::android::JavaParamRef<jobject>& bridge,
+ Profile* profile);
void Destroy(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj);
- void SetRecentlyClosedCallback(
- JNIEnv* env,
- const base::android::JavaParamRef<jobject>& obj,
- const base::android::JavaParamRef<jobject>& jcallback);
jboolean GetRecentlyClosedTabs(
JNIEnv* env,
const base::android::JavaParamRef<jobject>& obj,
@@ -41,8 +38,8 @@ class RecentlyClosedTabsBridge : public sessions::TabRestoreServiceObserver {
void ClearRecentlyClosedTabs(JNIEnv* env,
const base::android::JavaParamRef<jobject>& obj);
- // Observer callback for TabRestoreServiceObserver. Notifies the registered
- // callback that the recently closed tabs list has changed.
+ // Observer callback for TabRestoreServiceObserver. Notifies the Java bridge
+ // that the recently closed tabs list has changed.
void TabRestoreServiceChanged(sessions::TabRestoreService* service) override;
// Observer callback when our associated TabRestoreService is destroyed.
@@ -59,8 +56,8 @@ class RecentlyClosedTabsBridge : public sessions::TabRestoreServiceObserver {
// tab_restore_service_ may still be NULL, however, in incognito mode.
void EnsureTabRestoreService();
- // The callback to be notified when the list of recently closed tabs changes.
- base::android::ScopedJavaGlobalRef<jobject> callback_;
+ // The Java RecentlyClosedBridge.
+ base::android::ScopedJavaGlobalRef<jobject> bridge_;
// The profile whose recently closed tabs are being monitored.
Profile* profile_;

Powered by Google App Engine
This is Rietveld 408576698