diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-10 19:13:04 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-10 19:13:04 +0000 |
commit | b2b62dfc0bd1a579772ef9e24d3b951570067358 (patch) | |
tree | e569a766a58d4cf597e20559eef87546d3aa45e3 /chrome/browser/tabs/tab_strip_model.h | |
parent | cb66596fd784d3d70412deddb7f1c8313299f08d (diff) | |
download | chromium_src-b2b62dfc0bd1a579772ef9e24d3b951570067358.zip chromium_src-b2b62dfc0bd1a579772ef9e24d3b951570067358.tar.gz chromium_src-b2b62dfc0bd1a579772ef9e24d3b951570067358.tar.bz2 |
Further tweaks to TabStripModel::MoveSelectedTabsTo.
BUG=30572
TEST=none, just make sure tab selection isn't broke.
Review URL: http://codereview.chromium.org/6646050
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77669 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tabs/tab_strip_model.h')
-rw-r--r-- | chrome/browser/tabs/tab_strip_model.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/chrome/browser/tabs/tab_strip_model.h b/chrome/browser/tabs/tab_strip_model.h index d825d17..04c3743 100644 --- a/chrome/browser/tabs/tab_strip_model.h +++ b/chrome/browser/tabs/tab_strip_model.h @@ -230,6 +230,18 @@ class TabStripModel : public NotificationObserver { // did not contain any of the selected tabs. For example, if the tabstrip // contains [A b c D E f] (upper case selected) and this is invoked with 1 the // result is [b A D E c f]. + // This method maintains that all mini-tabs occur before non-mini-tabs. When + // mini-tabs are selected the move is processed in two chunks: first mini-tabs + // are moved, then non-mini-tabs are moved. If the index is after + // (mini-tab-count - selected-mini-tab-count), then the index the non-mini + // selected tabs are moved to is (index + selected-mini-tab-count). For + // example, if the model consists of [A b c D E f] (A b c are mini) and this + // is inokved with 2, the result is [b c A D E f]. In this example nothing + // special happened because the target index was <= (mini-tab-count - + // selected-mini-tab-count). If the target index were 3, then the result would + // be [b c A f D F]. A, being mini, can move no further than index 2. The + // non-mini-tabs are moved to the target index + selected-mini-tab-count (3 + + // 1) void MoveSelectedTabsTo(int index); // Returns the currently selected TabContents, or NULL if there is none. |