summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chromeos
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-04 17:23:18 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-04 17:23:18 +0000
commit0969d172f87f4692c7fdc94bc5aa12173b89b34e (patch)
treecef402ffd03618699f10061489c91840b3dc3d68 /chrome/browser/chromeos
parentc98f6a50d4a181a812f94988450f4d3bcb630893 (diff)
downloadchromium_src-0969d172f87f4692c7fdc94bc5aa12173b89b34e.zip
chromium_src-0969d172f87f4692c7fdc94bc5aa12173b89b34e.tar.gz
chromium_src-0969d172f87f4692c7fdc94bc5aa12173b89b34e.tar.bz2
Create a new base class BaseTabStrip that is the intermediary between BrowserView/etc and the specific active TabStrip implementation in use.
This simplifies things a lot. I don't need separate view IDs etc. http://crbug.com/34509 TEST=none Review URL: http://codereview.chromium.org/571002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38110 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos')
-rw-r--r--chrome/browser/chromeos/browser_view.cc2
-rw-r--r--chrome/browser/chromeos/browser_view.h3
-rw-r--r--chrome/browser/chromeos/compact_location_bar_host.cc2
3 files changed, 4 insertions, 3 deletions
diff --git a/chrome/browser/chromeos/browser_view.cc b/chrome/browser/chromeos/browser_view.cc
index 656196e..8baaf49 100644
--- a/chrome/browser/chromeos/browser_view.cc
+++ b/chrome/browser/chromeos/browser_view.cc
@@ -423,7 +423,7 @@ views::LayoutManager* BrowserView::CreateLayoutManager() const {
return new BrowserViewLayout();
}
-TabStrip* BrowserView::CreateTabStrip(
+BaseTabStrip* BrowserView::CreateTabStrip(
TabStripModel* tab_strip_model) {
return new ChromeosTabStrip(tab_strip_model, this);
}
diff --git a/chrome/browser/chromeos/browser_view.h b/chrome/browser/chromeos/browser_view.h
index 76dd08d..6b81982 100644
--- a/chrome/browser/chromeos/browser_view.h
+++ b/chrome/browser/chromeos/browser_view.h
@@ -7,6 +7,7 @@
#include "chrome/browser/chromeos/status_area_host.h"
#include "chrome/browser/views/frame/browser_view.h"
+#include "views/controls/button/button.h"
class TabStripModel;
@@ -61,7 +62,7 @@ class BrowserView : public ::BrowserView,
virtual void SetFocusToLocationBar();
virtual void ToggleCompactNavigationBar();
virtual views::LayoutManager* CreateLayoutManager() const;
- virtual TabStrip* CreateTabStrip(TabStripModel* tab_strip_model);
+ virtual BaseTabStrip* CreateTabStrip(TabStripModel* tab_strip_model);
// views::ButtonListener overrides.
virtual void ButtonPressed(views::Button* sender, const views::Event& event);
diff --git a/chrome/browser/chromeos/compact_location_bar_host.cc b/chrome/browser/chromeos/compact_location_bar_host.cc
index 8449b65..aafb5fd 100644
--- a/chrome/browser/chromeos/compact_location_bar_host.cc
+++ b/chrome/browser/chromeos/compact_location_bar_host.cc
@@ -207,7 +207,7 @@ gfx::Rect CompactLocationBarHost::GetBoundsUnderTab(int index) const {
// Get the position of the left-bottom corner of the tab on the
// widget. The widget of the tab is same as the widget of the
// BrowserView which is the parent of the host.
- TabStrip* tabstrip = browser_view()->tabstrip();
+ TabStrip* tabstrip = browser_view()->tabstrip()->AsTabStrip();
gfx::Rect bounds = tabstrip->GetIdealBounds(index);
gfx::Point tab_left_bottom(bounds.x(), bounds.height());
views::View::ConvertPointToWidget(tabstrip, &tab_left_bottom);