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 TabContentsWrapperContainer() {} |
| 21 virtual ~TabContentsWrapperContainer() {} |
| 22 |
| 23 // Count of TCWs in the container. |
| 24 virtual int tab_count() const = 0; |
| 25 |
| 26 // Index of the active TCW. |
| 27 virtual int active_index() const = 0; |
| 28 |
| 29 virtual int GetIndexOfController( |
| 30 const content::NavigationController* controller) const = 0; |
| 31 |
| 32 // Returns active TCW. |
| 33 // TODO(dpapad): Rename to GetActiveTabContentsWrapper(). |
| 34 virtual TabContentsWrapper* GetSelectedTabContentsWrapper() const = 0; |
| 35 |
| 36 // A convenient version of the above which returns the TCW's WebContents. |
| 37 virtual content::WebContents* GetSelectedWebContents() const = 0; |
| 38 |
| 39 // Returns TCW at specified index. |
| 40 virtual TabContentsWrapper* GetTabContentsWrapperAt(int index) const = 0; |
| 41 |
| 42 // A convenient version of the above which returns the TCW's WebContents. |
| 43 virtual content::WebContents* GetWebContentsAt(int index) const = 0; |
| 44 |
| 45 private: |
| 46 DISALLOW_COPY_AND_ASSIGN(TabContentsWrapperContainer); |
| 47 }; |
| 48 |
| 49 #endif // CHROME_BROWSER_UI_TAB_CONTENTS_TAB_CONTENTS_WRAPPER_CONTAINER_H_ |
OLD | NEW |