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

Unified Diff: chrome/browser/gtk/tabs/tab_strip_gtk.h

Issue 199054: GTK: fix tabstrip index misalignment during tab removal.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: remove debugging code Created 11 years, 3 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/browser.cc ('k') | chrome/browser/gtk/tabs/tab_strip_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/gtk/tabs/tab_strip_gtk.h
===================================================================
--- chrome/browser/gtk/tabs/tab_strip_gtk.h (revision 25676)
+++ chrome/browser/gtk/tabs/tab_strip_gtk.h (working copy)
@@ -271,9 +271,19 @@
// Returns the number of pinned tabs.
int GetPinnedTabCount() const;
- // Retrieves the Tab at the specified index.
+ // Retrieves the Tab at the specified index. Take care in using this, you may
+ // need to use GetTabAtAdjustForAnimation.
TabGtk* GetTabAt(int index) const;
+ // Returns the tab at the specified index. If a remove animation is on going
+ // and the index is >= the index of the tab being removed, the index is
+ // incremented. While a remove operation is on going the indices of the model
+ // do not line up with the indices of the view. This method adjusts the index
+ // accordingly.
+ //
+ // Use this instead of GetTabAt if the index comes from the model.
+ TabGtk* GetTabAtAdjustForAnimation(int index) const;
+
// Returns the exact (unrounded) current width of each tab.
void GetCurrentTabWidths(double* unselected_width,
double* selected_width) const;
« no previous file with comments | « chrome/browser/browser.cc ('k') | chrome/browser/gtk/tabs/tab_strip_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698