diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-05 20:31:33 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-05 20:31:33 +0000 |
commit | 567ef6b8cb403e7837740e7cb4843fd181c1dc39 (patch) | |
tree | fa9359b1c0aa75453d40a40205122949c39030ad /chrome/browser/views | |
parent | 0b8a69b2d612f96fb2dcc3dfab374fdff6bd3685 (diff) | |
download | chromium_src-567ef6b8cb403e7837740e7cb4843fd181c1dc39.zip chromium_src-567ef6b8cb403e7837740e7cb4843fd181c1dc39.tar.gz chromium_src-567ef6b8cb403e7837740e7cb4843fd181c1dc39.tar.bz2 |
Yet more tab strip model changes. I'm hoping this is the last of
it. I'm now going with:
// . Mini-tab. Mini tabs are locked to the left side of the tab strip and
// rendered differently (small tabs with only a favicon). The model makes
// sure all mini-tabs are at the beginning of the tab strip. For example,
// if a non-mini tab is added it is forced to be with non-mini tabs. Requests
// to move tabs outside the range of the tab type are ignored. For example,
// a request to move a mini-tab after non-mini-tabs is ignored.
// You'll notice there is no explcit api for making a tab a mini-tab, rather
// there are two tab types that are implicitly mini-tabs:
// . App. Corresponds to an extension that wants an app tab. App tabs are
// identified by TabContents::is_app().
// . Pinned. Any tab can be pinned. A pinned tab is made phantom when closed.
// Non-app tabs whose pinned state is changed are moved to be with other
// mini-tabs or non-mini tabs.
I'm going with a more neutral name like mini-tabs so that we can
change the meaning if we need to without changing around all the UI
code. I'll convert the UI code next.
BUG=32845
TEST=none
Review URL: http://codereview.chromium.org/570043
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38237 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views')
-rw-r--r-- | chrome/browser/views/tabs/dragged_tab_controller.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/chrome/browser/views/tabs/dragged_tab_controller.cc b/chrome/browser/views/tabs/dragged_tab_controller.cc index 61d3d6a..96dcaae 100644 --- a/chrome/browser/views/tabs/dragged_tab_controller.cc +++ b/chrome/browser/views/tabs/dragged_tab_controller.cc @@ -681,7 +681,7 @@ void DraggedTabController::MoveTab(const gfx::Point& screen_point) { if (!view_->pinned()) { // If the dragged tab isn't pinned, don't allow the drag to a pinned // tab. - to_index = std::max(to_index, attached_model->IndexOfFirstNonAppTab()); + to_index = std::max(to_index, attached_model->IndexOfFirstNonMiniTab()); } if (from_index != to_index) { last_move_screen_x_ = screen_point.x(); @@ -744,7 +744,7 @@ void DraggedTabController::StartPinTimerIfNecessary( return; TabStripModel* attached_model = attached_tabstrip_->model(); - int app_count = attached_model->IndexOfFirstNonAppTab(); + int app_count = attached_model->IndexOfFirstNonMiniTab(); if (app_count > 0) return; @@ -767,7 +767,7 @@ void DraggedTabController::AdjustDragPointForPinnedTabs( int* from_index, gfx::Point* dragged_tab_point) { TabStripModel* attached_model = attached_tabstrip_->model(); - int pinned_count = attached_model->IndexOfFirstNonAppTab(); + int pinned_count = attached_model->IndexOfFirstNonMiniTab(); if (pinned_count == 0) return; @@ -981,7 +981,7 @@ void DraggedTabController::Detach() { } int DraggedTabController::GetPinnedThreshold() { - int pinned_count = attached_tabstrip_->model()->IndexOfFirstNonAppTab(); + int pinned_count = attached_tabstrip_->model()->IndexOfFirstNonMiniTab(); if (pinned_count == 0) return 0; if (!view_->pinned()) { |