OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_UI_TAB_CONTENTS_TAB_CONTENTS_WRAPPER_CONTAINER_H_ |
| 6 #define CHROME_BROWSER_UI_TAB_CONTENTS_TAB_CONTENTS_WRAPPER_CONTAINER_H_ |
| 7 #pragma once |
| 8 |
| 9 class TabContentsWrapper; |
| 10 |
| 11 namespace content { |
| 12 class NavigationController; |
| 13 class WebContents; |
| 14 } |
| 15 |
| 16 // Interface which provides simple functionality for accessing |
| 17 // TabContentsWrapper instances. |
| 18 class TabContentsWrapperContainer { |
| 19 public: |
| 20 virtual ~TabContentsWrapperContainer() {} |
| 21 |
| 22 // Returns the number of TCWs in this container. |
| 23 virtual int TabCount() const = 0; |
| 24 |
| 25 // Returns the index of the active TCW. |
| 26 virtual int ActiveIndex() const = 0; |
| 27 |
| 28 virtual int GetIndexOfController( |
| 29 const content::NavigationController* controller) const = 0; |
| 30 |
| 31 // Returns active TCW. |
| 32 virtual TabContentsWrapper* GetActiveTabContentsWrapper() const = 0; |
| 33 |
| 34 // A convenient version of the above which returns the TCW's WebContents. |
| 35 virtual content::WebContents* GetActiveWebContents() const = 0; |
| 36 |
| 37 // Returns TCW at specified index. |
| 38 virtual TabContentsWrapper* GetTabContentsWrapperAt(int index) const = 0; |
| 39 |
| 40 // A convenient version of the above which returns the TCW's WebContents. |
| 41 virtual content::WebContents* GetWebContentsAt(int index) const = 0; |
| 42 }; |
| 43 |
| 44 #endif // CHROME_BROWSER_UI_TAB_CONTENTS_TAB_CONTENTS_WRAPPER_CONTAINER_H_ |
OLD | NEW |