| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_UI_ANDROID_TAB_MODEL_TAB_MODEL_BASE_H_ | 5 #ifndef CHROME_BROWSER_UI_ANDROID_TAB_MODEL_TAB_MODEL_BASE_H_ |
| 6 #define CHROME_BROWSER_UI_ANDROID_TAB_MODEL_TAB_MODEL_BASE_H_ | 6 #define CHROME_BROWSER_UI_ANDROID_TAB_MODEL_TAB_MODEL_BASE_H_ |
| 7 | 7 |
| 8 #include <jni.h> | 8 #include <jni.h> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 public: | 28 public: |
| 29 TabModelBase(JNIEnv* env, jobject obj, Profile* profile); | 29 TabModelBase(JNIEnv* env, jobject obj, Profile* profile); |
| 30 void Destroy(JNIEnv* env, jobject obj); | 30 void Destroy(JNIEnv* env, jobject obj); |
| 31 | 31 |
| 32 // Called by JNI | 32 // Called by JNI |
| 33 base::android::ScopedJavaLocalRef<jobject> GetProfileAndroid(JNIEnv* env, | 33 base::android::ScopedJavaLocalRef<jobject> GetProfileAndroid(JNIEnv* env, |
| 34 jobject obj); | 34 jobject obj); |
| 35 void TabAddedToModel(JNIEnv* env, jobject obj, jobject jtab); | 35 void TabAddedToModel(JNIEnv* env, jobject obj, jobject jtab); |
| 36 | 36 |
| 37 // TabModel: | 37 // TabModel: |
| 38 virtual int GetTabCount() const OVERRIDE; | 38 virtual int GetTabCount() const override; |
| 39 virtual int GetActiveIndex() const OVERRIDE; | 39 virtual int GetActiveIndex() const override; |
| 40 virtual content::WebContents* GetWebContentsAt(int index) const OVERRIDE; | 40 virtual content::WebContents* GetWebContentsAt(int index) const override; |
| 41 virtual TabAndroid* GetTabAt(int index) const OVERRIDE; | 41 virtual TabAndroid* GetTabAt(int index) const override; |
| 42 | 42 |
| 43 virtual void SetActiveIndex(int index) OVERRIDE; | 43 virtual void SetActiveIndex(int index) override; |
| 44 virtual void CloseTabAt(int index) OVERRIDE; | 44 virtual void CloseTabAt(int index) override; |
| 45 | 45 |
| 46 virtual void CreateTab(content::WebContents* web_contents, | 46 virtual void CreateTab(content::WebContents* web_contents, |
| 47 int parent_tab_id) OVERRIDE; | 47 int parent_tab_id) override; |
| 48 virtual content::WebContents* CreateNewTabForDevTools( | 48 virtual content::WebContents* CreateNewTabForDevTools( |
| 49 const GURL& url) OVERRIDE; | 49 const GURL& url) override; |
| 50 | 50 |
| 51 // Return true if we are currently restoring sessions asynchronously. | 51 // Return true if we are currently restoring sessions asynchronously. |
| 52 virtual bool IsSessionRestoreInProgress() const OVERRIDE; | 52 virtual bool IsSessionRestoreInProgress() const override; |
| 53 | 53 |
| 54 // Instructs the TabModel to broadcast a notification that all tabs are now | 54 // Instructs the TabModel to broadcast a notification that all tabs are now |
| 55 // loaded from storage. | 55 // loaded from storage. |
| 56 void BroadcastSessionRestoreComplete(JNIEnv* env, jobject obj); | 56 void BroadcastSessionRestoreComplete(JNIEnv* env, jobject obj); |
| 57 | 57 |
| 58 private: | 58 private: |
| 59 virtual ~TabModelBase(); | 59 virtual ~TabModelBase(); |
| 60 | 60 |
| 61 JavaObjectWeakGlobalRef java_object_; | 61 JavaObjectWeakGlobalRef java_object_; |
| 62 }; | 62 }; |
| 63 | 63 |
| 64 // Register the Tab's native methods through jni. | 64 // Register the Tab's native methods through jni. |
| 65 bool RegisterTabModelBase(JNIEnv* env); | 65 bool RegisterTabModelBase(JNIEnv* env); |
| 66 | 66 |
| 67 #endif // CHROME_BROWSER_UI_ANDROID_TAB_MODEL_TAB_MODEL_BASE_H_ | 67 #endif // CHROME_BROWSER_UI_ANDROID_TAB_MODEL_TAB_MODEL_BASE_H_ |
| OLD | NEW |