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

Unified Diff: chrome/browser/ui/android/tab_model/tab_model_base.h

Issue 583373002: Break apart the TabModelBase's JNI calls into its own class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More changes Created 6 years, 2 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/ui/android/tab_model/tab_model_base.h
diff --git a/chrome/browser/ui/android/tab_model/tab_model_base.h b/chrome/browser/ui/android/tab_model/tab_model_base.h
index b1972936f5657fe10af46b99ec2d2baa9efad42a..2eed043d260265e8c043e8e21c7b539542f550b8 100644
--- a/chrome/browser/ui/android/tab_model/tab_model_base.h
+++ b/chrome/browser/ui/android/tab_model/tab_model_base.h
@@ -12,7 +12,7 @@
#include "base/android/scoped_java_ref.h"
#include "base/compiler_specific.h"
#include "base/logging.h"
-#include "chrome/browser/ui/android/tab_model/tab_model.h"
+#include "chrome/browser/ui/android/tab_model/tab_model_jni_bridge.h"
class Profile;
class TabAndroid;
@@ -24,41 +24,12 @@ class WebContents;
// Native representation of TabModelBase which provides access to information
// about a tabstrip to native code and could potentially be used in place of
// Browser for some functionality in Clank.
-class TabModelBase : public TabModel {
+class TabModelBase : public TabModelJniBridge {
David Trainor- moved to gerrit 2014/10/10 22:45:29 Can this whole file be deleted now? We can drive
gone 2014/10/10 23:06:38 Can this be a follow up? DocumentTabList still ha
public:
- TabModelBase(JNIEnv* env, jobject obj, Profile* profile);
- void Destroy(JNIEnv* env, jobject obj);
-
- // Called by JNI
- base::android::ScopedJavaLocalRef<jobject> GetProfileAndroid(JNIEnv* env,
- jobject obj);
- void TabAddedToModel(JNIEnv* env, jobject obj, jobject jtab);
+ TabModelBase(JNIEnv* env, jobject obj, bool is_incognito);
+ virtual ~TabModelBase() { }
// TabModel:
- virtual int GetTabCount() const override;
- virtual int GetActiveIndex() const override;
- virtual content::WebContents* GetWebContentsAt(int index) const override;
- virtual TabAndroid* GetTabAt(int index) const override;
-
- virtual void SetActiveIndex(int index) override;
- virtual void CloseTabAt(int index) override;
-
- virtual void CreateTab(content::WebContents* web_contents,
- int parent_tab_id) override;
- virtual content::WebContents* CreateNewTabForDevTools(
- const GURL& url) override;
-
- // Return true if we are currently restoring sessions asynchronously.
- virtual bool IsSessionRestoreInProgress() const override;
-
- // Instructs the TabModel to broadcast a notification that all tabs are now
- // loaded from storage.
- void BroadcastSessionRestoreComplete(JNIEnv* env, jobject obj);
-
- private:
- virtual ~TabModelBase();
-
- JavaObjectWeakGlobalRef java_object_;
};
// Register the Tab's native methods through jni.

Powered by Google App Engine
This is Rietveld 408576698