| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_H_ | 5 #ifndef CHROME_BROWSER_UI_ANDROID_TAB_MODEL_TAB_MODEL_H_ |
| 6 #define CHROME_BROWSER_UI_ANDROID_TAB_MODEL_TAB_MODEL_H_ | 6 #define CHROME_BROWSER_UI_ANDROID_TAB_MODEL_TAB_MODEL_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 virtual SessionID::id_type GetSessionId() const; | 42 virtual SessionID::id_type GetSessionId() const; |
| 43 virtual const SessionID& SessionId() const; | 43 virtual const SessionID& SessionId() const; |
| 44 virtual sessions::LiveTabContext* GetLiveTabContext() const; | 44 virtual sessions::LiveTabContext* GetLiveTabContext() const; |
| 45 | 45 |
| 46 virtual int GetTabCount() const = 0; | 46 virtual int GetTabCount() const = 0; |
| 47 virtual int GetActiveIndex() const = 0; | 47 virtual int GetActiveIndex() const = 0; |
| 48 virtual content::WebContents* GetActiveWebContents() const; | 48 virtual content::WebContents* GetActiveWebContents() const; |
| 49 virtual content::WebContents* GetWebContentsAt(int index) const = 0; | 49 virtual content::WebContents* GetWebContentsAt(int index) const = 0; |
| 50 // This will return NULL if the tab has not yet been initialized. | 50 // This will return NULL if the tab has not yet been initialized. |
| 51 virtual TabAndroid* GetTabAt(int index) const = 0; | 51 virtual TabAndroid* GetTabAt(int index) const = 0; |
| 52 virtual bool IsTabbedActivity() const = 0; |
| 52 | 53 |
| 53 virtual void SetActiveIndex(int index) = 0; | 54 virtual void SetActiveIndex(int index) = 0; |
| 54 virtual void CloseTabAt(int index) = 0; | 55 virtual void CloseTabAt(int index) = 0; |
| 55 | 56 |
| 56 // Used for restoring tabs from synced foreign sessions. | 57 // Used for restoring tabs from synced foreign sessions. |
| 57 virtual void CreateTab(TabAndroid* parent, | 58 virtual void CreateTab(TabAndroid* parent, |
| 58 content::WebContents* web_contents, | 59 content::WebContents* web_contents, |
| 59 int parent_tab_id) = 0; | 60 int parent_tab_id) = 0; |
| 60 | 61 |
| 61 // Used by Developer Tools to create a new tab with a given URL. | 62 // Used by Developer Tools to create a new tab with a given URL. |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 // across sessions. | 101 // across sessions. |
| 101 SessionID session_id_; | 102 SessionID session_id_; |
| 102 | 103 |
| 103 // The Registrar used to register TabModel for notifications. | 104 // The Registrar used to register TabModel for notifications. |
| 104 content::NotificationRegistrar registrar_; | 105 content::NotificationRegistrar registrar_; |
| 105 | 106 |
| 106 DISALLOW_COPY_AND_ASSIGN(TabModel); | 107 DISALLOW_COPY_AND_ASSIGN(TabModel); |
| 107 }; | 108 }; |
| 108 | 109 |
| 109 #endif // CHROME_BROWSER_UI_ANDROID_TAB_MODEL_TAB_MODEL_H_ | 110 #endif // CHROME_BROWSER_UI_ANDROID_TAB_MODEL_TAB_MODEL_H_ |
| OLD | NEW |