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..a74a90de7323d8d82def735e56ea9df3a4551845 |
--- /dev/null |
+++ b/chrome/browser/ui/tab_contents/tab_contents_wrapper_container.h |
@@ -0,0 +1,49 @@ |
+// 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: |
+ TabContentsWrapperContainer() {} |
+ virtual ~TabContentsWrapperContainer() {} |
+ |
+ // Count of TCWs in the container. |
+ virtual int tab_count() const = 0; |
+ |
+ // Index of the active TCW. |
+ virtual int active_index() const = 0; |
+ |
+ virtual int GetIndexOfController( |
+ const content::NavigationController* controller) const = 0; |
+ |
+ // Returns active TCW. |
+ // TODO(dpapad): Rename to GetActiveTabContentsWrapper(). |
+ virtual TabContentsWrapper* GetSelectedTabContentsWrapper() const = 0; |
+ |
+ // A convenient version of the above which returns the TCW's WebContents. |
+ virtual content::WebContents* GetSelectedWebContents() 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; |
+ |
+ private: |
+ DISALLOW_COPY_AND_ASSIGN(TabContentsWrapperContainer); |
+}; |
+ |
+#endif // CHROME_BROWSER_UI_TAB_CONTENTS_TAB_CONTENTS_WRAPPER_CONTAINER_H_ |