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

Unified Diff: chrome/browser/ui/views/tabs/base_tab_strip.cc

Issue 6822006: Adds scroll buttons to side tabs so that you can get to all the tabs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleanup Created 9 years, 8 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
« no previous file with comments | « chrome/browser/ui/views/tabs/base_tab_strip.h ('k') | chrome/browser/ui/views/tabs/side_tab_strip.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/tabs/base_tab_strip.cc
diff --git a/chrome/browser/ui/views/tabs/base_tab_strip.cc b/chrome/browser/ui/views/tabs/base_tab_strip.cc
index cfd0bc0e36801a4a0b21351753812dbb2b34c0ee..4f1742810149c45c0fbfd89e560bd7213f7fba85 100644
--- a/chrome/browser/ui/views/tabs/base_tab_strip.cc
+++ b/chrome/browser/ui/views/tabs/base_tab_strip.cc
@@ -126,10 +126,6 @@ BaseTabStrip::BaseTabStrip(TabStripController* controller, Type type)
BaseTabStrip::~BaseTabStrip() {
}
-bool BaseTabStrip::IsAnimating() const {
- return bounds_animator_.IsAnimating();
-}
-
void BaseTabStrip::AddTabAt(int model_index, const TabRendererData& data) {
BaseTab* tab = CreateTab();
tab->SetData(data);
@@ -150,14 +146,11 @@ void BaseTabStrip::AddTabAt(int model_index, const TabRendererData& data) {
void BaseTabStrip::MoveTab(int from_model_index, int to_model_index) {
int from_tab_data_index = ModelIndexToTabIndex(from_model_index);
-
BaseTab* tab = tab_data_[from_tab_data_index].tab;
tab_data_.erase(tab_data_.begin() + from_tab_data_index);
TabData data = {tab, gfx::Rect()};
-
int to_tab_data_index = ModelIndexToTabIndex(to_model_index);
-
tab_data_.insert(tab_data_.begin() + to_tab_data_index, data);
StartMoveTabAnimation();
@@ -562,8 +555,11 @@ void BaseTabStrip::DoLayout() {
SchedulePaint();
}
-BaseTab* BaseTabStrip::GetTabAtLocal(
- const gfx::Point& local_point) {
+bool BaseTabStrip::IsAnimating() const {
+ return bounds_animator_.IsAnimating();
+}
+
+BaseTab* BaseTabStrip::GetTabAtLocal(const gfx::Point& local_point) {
views::View* view = GetEventHandlerForPoint(local_point);
if (!view)
return NULL; // No tab contains the point.
« no previous file with comments | « chrome/browser/ui/views/tabs/base_tab_strip.h ('k') | chrome/browser/ui/views/tabs/side_tab_strip.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698