Index: chrome/browser/ui/tab_contents/tab_contents_wrapper_container.h |
diff --git a/chrome/browser/ui/tab_contents/tab_contents_wrapper_container.h b/chrome/browser/ui/tab_contents/tab_contents_wrapper_container.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..be0dd8d2c95f6b7c64a7af746eba03a4086b24b1 |
--- /dev/null |
+++ b/chrome/browser/ui/tab_contents/tab_contents_wrapper_container.h |
@@ -0,0 +1,44 @@ |
+// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_BROWSER_UI_TAB_CONTENTS_TAB_CONTENTS_WRAPPER_CONTAINER_H_ |
+#define CHROME_BROWSER_UI_TAB_CONTENTS_TAB_CONTENTS_WRAPPER_CONTAINER_H_ |
+#pragma once |
+ |
+class TabContentsWrapper; |
+ |
+namespace content { |
+class NavigationController; |
+class WebContents; |
+} |
+ |
+// Interface which provides simple functionality for accessing |
+// TabContentsWrapper instances. |
+class TabContentsWrapperContainer { |
+ public: |
+ virtual ~TabContentsWrapperContainer() {} |
+ |
+ // Returns the number of TCWs in this container. |
+ virtual int TabCount() const = 0; |
+ |
+ // Returns the index of the active TCW. |
+ virtual int ActiveIndex() const = 0; |
+ |
+ virtual int GetIndexOfController( |
+ const content::NavigationController* controller) const = 0; |
+ |
+ // Returns active TCW. |
+ virtual TabContentsWrapper* GetActiveTabContentsWrapper() const = 0; |
+ |
+ // A convenient version of the above which returns the TCW's WebContents. |
+ virtual content::WebContents* GetActiveWebContents() const = 0; |
+ |
+ // Returns TCW at specified index. |
+ virtual TabContentsWrapper* GetTabContentsWrapperAt(int index) const = 0; |
+ |
+ // A convenient version of the above which returns the TCW's WebContents. |
+ virtual content::WebContents* GetWebContentsAt(int index) const = 0; |
+}; |
+ |
+#endif // CHROME_BROWSER_UI_TAB_CONTENTS_TAB_CONTENTS_WRAPPER_CONTAINER_H_ |