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

Unified Diff: chrome/browser/ui/views/tabs/touch_tab_strip_layout.h

Issue 10409016: Makes the touch tabstrip scroll so that tabs opened in the background (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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 | « no previous file | chrome/browser/ui/views/tabs/touch_tab_strip_layout.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/tabs/touch_tab_strip_layout.h
diff --git a/chrome/browser/ui/views/tabs/touch_tab_strip_layout.h b/chrome/browser/ui/views/tabs/touch_tab_strip_layout.h
index bdd955cd8094632b277bf00b5612693fa2748a8e..f0127796964936011f180715f3822511e9f152fc 100644
--- a/chrome/browser/ui/views/tabs/touch_tab_strip_layout.h
+++ b/chrome/browser/ui/views/tabs/touch_tab_strip_layout.h
@@ -96,6 +96,10 @@ class TouchTabStripLayout {
// Resets to an ideal layout state.
void ResetToIdealState();
+ // Makes |index| visible. This is used when a new tab is added that isn't
+ // active.
+ void MakeVisible(int index);
+
// Returns the x-coordinate for the active tab constrained by the current tab
// counts.
int ConstrainActiveX(int x) const;
@@ -155,8 +159,7 @@ class TouchTabStripLayout {
// Width needed to display |count| tabs.
int width_for_count(int count) const {
- return count == 0 ? 0 :
- (count * size_.width()) + (std::max(count - 1, 0) * padding_);
+ return (count * size_.width()) + (std::max(count - 1, 0) * padding_);
}
// Padding needed for |count| stacked tabs.
« no previous file with comments | « no previous file | chrome/browser/ui/views/tabs/touch_tab_strip_layout.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698