Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2691)

Unified Diff: chrome/browser/ui/tab_contents/tab_contents_wrapper_container.h

Issue 9479008: Re-factor location bar/toolbar code to get rid of the browser dependency. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments fix Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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_

Powered by Google App Engine
This is Rietveld 408576698