diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-27 14:54:49 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-27 14:54:49 +0000 |
commit | 1dc475f2470ea831f31e8d553eea0e4e3d1216cb (patch) | |
tree | 430b7ac6b3a92f55ddff9fa0242aa1e319ba9584 /chrome/browser/tabs | |
parent | b68becccf8fd9deb39346f1d36413817ab924e78 (diff) | |
download | chromium_src-1dc475f2470ea831f31e8d553eea0e4e3d1216cb.zip chromium_src-1dc475f2470ea831f31e8d553eea0e4e3d1216cb.tar.gz chromium_src-1dc475f2470ea831f31e8d553eea0e4e3d1216cb.tar.bz2 |
Makes unpinning a phantom tab close it.
BUG=45050
TEST=see bug
Review URL: http://codereview.chromium.org/2285001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48390 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tabs')
-rw-r--r-- | chrome/browser/tabs/tab_strip_model.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/chrome/browser/tabs/tab_strip_model.cc b/chrome/browser/tabs/tab_strip_model.cc index a60268b..306fb7f 100644 --- a/chrome/browser/tabs/tab_strip_model.cc +++ b/chrome/browser/tabs/tab_strip_model.cc @@ -679,8 +679,14 @@ void TabStripModel::ExecuteContextMenuCommand( UserMetricsAction("TabContextMenu_TogglePinned"), profile_); - SelectTabContentsAt(context_index, true); - SetTabPinned(context_index, !IsTabPinned(context_index)); + if (IsPhantomTab(context_index)) { + // The tab is a phantom tab, close it. + CloseTabContentsAt(context_index, + CLOSE_USER_GESTURE | CLOSE_CREATE_HISTORICAL_TAB); + } else { + SelectTabContentsAt(context_index, true); + SetTabPinned(context_index, !IsTabPinned(context_index)); + } break; } |