summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gtk/tabs
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-22 00:15:17 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-22 00:15:17 +0000
commitc37e3b6de9ccfd2bc4c5f2852ae2e4b5ec9b985d (patch)
treee5df41c5242a176e955db360d5de40225fded383 /chrome/browser/gtk/tabs
parent7e3544bd5859cad57261bc4827686f266a8d3961 (diff)
downloadchromium_src-c37e3b6de9ccfd2bc4c5f2852ae2e4b5ec9b985d.zip
chromium_src-c37e3b6de9ccfd2bc4c5f2852ae2e4b5ec9b985d.tar.gz
chromium_src-c37e3b6de9ccfd2bc4c5f2852ae2e4b5ec9b985d.tar.bz2
Adds support for phantom tabs. A pinned tab becomes a phantom tab when
it is closed, and effectively unloads the renderer and replaces it with a new TabContents that loads when selected. A phantom tab is currently rendered without a border. Phantom tabs do not prevent a window from closing. Long term only pinned app tabs will have the ability to be made phantom, but this allows us to test the feature until app support is all wired in. BUG=32845 TEST=none yet Review URL: http://codereview.chromium.org/553008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36815 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk/tabs')
-rw-r--r--chrome/browser/gtk/tabs/dragged_tab_controller_gtk.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/chrome/browser/gtk/tabs/dragged_tab_controller_gtk.cc b/chrome/browser/gtk/tabs/dragged_tab_controller_gtk.cc
index 65fa966..415710c 100644
--- a/chrome/browser/gtk/tabs/dragged_tab_controller_gtk.cc
+++ b/chrome/browser/gtk/tabs/dragged_tab_controller_gtk.cc
@@ -556,7 +556,7 @@ void DraggedTabControllerGtk::Detach() {
}
// If we've removed the last tab from the tabstrip, hide the frame now.
- if (attached_model->empty())
+ if (!attached_model->HasNonPhantomTabs())
HideWindow();
// Update the dragged tab. This NULL check is necessary apparently in some
@@ -865,7 +865,7 @@ void DraggedTabControllerGtk::ShowWindow() {
void DraggedTabControllerGtk::CleanUpHiddenFrame() {
// If the model we started dragging from is now empty, we must ask the
// delegate to close the frame.
- if (source_tabstrip_->model()->empty())
+ if (!source_tabstrip_->model()->HasNonPhantomTabs())
source_tabstrip_->model()->delegate()->CloseFrameAfterDragSession();
}