summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/browser_window_controller.mm
diff options
context:
space:
mode:
authorpinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-29 20:59:13 +0000
committerpinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-29 20:59:13 +0000
commitd03e1e02dcbb2a712ab317443dcefd2354de8e7a (patch)
tree05566348ee3e51fd83ba98fa1f9414a63deec90e /chrome/browser/cocoa/browser_window_controller.mm
parent50e0a1c56b14c3083b4a6f143bc56a5601a732b3 (diff)
downloadchromium_src-d03e1e02dcbb2a712ab317443dcefd2354de8e7a.zip
chromium_src-d03e1e02dcbb2a712ab317443dcefd2354de8e7a.tar.gz
chromium_src-d03e1e02dcbb2a712ab317443dcefd2354de8e7a.tar.bz2
Fix dragging a tab out of a window when the only tabs left behind are phantom tabs.
BUG=42698 TEST=per bug. Might want to re-test dragging single tabs and dragging tabs out when there are pinned tabs (not phantoms). Review URL: http://codereview.chromium.org/1727013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45982 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/browser_window_controller.mm')
-rw-r--r--chrome/browser/cocoa/browser_window_controller.mm5
1 files changed, 5 insertions, 0 deletions
diff --git a/chrome/browser/cocoa/browser_window_controller.mm b/chrome/browser/cocoa/browser_window_controller.mm
index 6da85b2..afe2124 100644
--- a/chrome/browser/cocoa/browser_window_controller.mm
+++ b/chrome/browser/cocoa/browser_window_controller.mm
@@ -1272,9 +1272,14 @@
}
- (NSInteger)numberOfTabs {
+ // count() includes pinned tabs (both live and phantom).
return browser_->tabstrip_model()->count();
}
+- (BOOL)hasLiveTabs {
+ return browser_->tabstrip_model()->HasNonPhantomTabs();
+}
+
- (NSString*)selectedTabTitle {
TabContents* contents = browser_->tabstrip_model()->GetSelectedTabContents();
return base::SysUTF16ToNSString(contents->GetTitle());