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

Unified Diff: chrome/browser/ui/browser_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/browser_tab_contents_wrapper_container.h
diff --git a/chrome/browser/ui/browser_tab_contents_wrapper_container.h b/chrome/browser/ui/browser_tab_contents_wrapper_container.h
new file mode 100644
index 0000000000000000000000000000000000000000..9fda365145a5f5ca4ad475d745502d28af132a28
--- /dev/null
+++ b/chrome/browser/ui/browser_tab_contents_wrapper_container.h
@@ -0,0 +1,38 @@
+// 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_BROWSER_TAB_CONTENTS_WRAPPER_CONTAINER_H_
+#define CHROME_BROWSER_UI_BROWSER_TAB_CONTENTS_WRAPPER_CONTAINER_H_
+#pragma once
+
+#include "base/basictypes.h"
+#include "base/compiler_specific.h"
+#include "chrome/browser/ui/tab_contents/tab_contents_wrapper_container.h"
+
+class Browser;
+
+// Implementation of TabContentsWrapperContainer which uses an instance of
+// Browser in order to fulfil its duties.
+class BrowserTabContentsWrapperContainer : public TabContentsWrapperContainer {
+ public:
+ explicit BrowserTabContentsWrapperContainer(Browser* browser);
+ virtual ~BrowserTabContentsWrapperContainer();
+
+ // TabContentsWrapperContainer implementation:
+ virtual int TabCount() const OVERRIDE;
+ virtual int ActiveIndex() const OVERRIDE;
+ virtual int GetIndexOfController(
+ const content::NavigationController* controller) const OVERRIDE;
+ virtual TabContentsWrapper* GetActiveTabContentsWrapper() const OVERRIDE;
+ virtual content::WebContents* GetActiveWebContents() const OVERRIDE;
+ virtual TabContentsWrapper* GetTabContentsWrapperAt(int index) const OVERRIDE;
+ virtual content::WebContents* GetWebContentsAt(int index) const OVERRIDE;
+
+ private:
+ Browser* browser_;
+
+ DISALLOW_COPY_AND_ASSIGN(BrowserTabContentsWrapperContainer);
+};
+
+#endif // CHROME_BROWSER_UI_BROWSER_TAB_CONTENTS_WRAPPER_CONTAINER_H_

Powered by Google App Engine
This is Rietveld 408576698