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

Unified Diff: chrome/browser/ui/browser_tab_contents_wrapper_container.cc

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.cc
diff --git a/chrome/browser/ui/browser_tab_contents_wrapper_container.cc b/chrome/browser/ui/browser_tab_contents_wrapper_container.cc
new file mode 100644
index 0000000000000000000000000000000000000000..97a7fff2afb89c099791995e05c4e14abc520afb
--- /dev/null
+++ b/chrome/browser/ui/browser_tab_contents_wrapper_container.cc
@@ -0,0 +1,47 @@
+// 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.
+
+#include "chrome/browser/ui/browser_tab_contents_wrapper_container.h"
+
+#include "chrome/browser/ui/browser.h"
+
+BrowserTabContentsWrapperContainer::BrowserTabContentsWrapperContainer(
+ Browser* browser) : browser_(browser) {
+}
+
+BrowserTabContentsWrapperContainer::~BrowserTabContentsWrapperContainer() {
+}
+
+int BrowserTabContentsWrapperContainer::TabCount() const {
+ return browser_->tab_count();
+}
+
+int BrowserTabContentsWrapperContainer::ActiveIndex() const {
+ return browser_->active_index();
+}
+
+int BrowserTabContentsWrapperContainer::GetIndexOfController(
+ const content::NavigationController* controller) const {
+ return browser_->GetIndexOfController(controller);
+}
+
+TabContentsWrapper*
+BrowserTabContentsWrapperContainer::GetActiveTabContentsWrapper() const {
+ return browser_->GetSelectedTabContentsWrapper();
+}
+
+content::WebContents*
+BrowserTabContentsWrapperContainer::GetActiveWebContents() const {
+ return browser_->GetSelectedWebContents();
+}
+
+TabContentsWrapper*
+BrowserTabContentsWrapperContainer::GetTabContentsWrapperAt(int index) const {
+ return browser_->GetTabContentsWrapperAt(index);
+}
+
+content::WebContents*
+BrowserTabContentsWrapperContainer::GetWebContentsAt(int index) const {
+ return browser_->GetWebContentsAt(index);
+}

Powered by Google App Engine
This is Rietveld 408576698