Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3179)

Unified Diff: chrome/browser/cocoa/browser_window_controller.mm

Issue 2821011: Removes phantom tabs. (Closed)
Patch Set: Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/browser_browsertest.cc ('k') | chrome/browser/cocoa/tab_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/browser_window_controller.mm
diff --git a/chrome/browser/cocoa/browser_window_controller.mm b/chrome/browser/cocoa/browser_window_controller.mm
index 4b57df7968442c64da86628080ee3c13b23f9243..51a464ad13a934a729d8d8fee32d202e499491f9 100644
--- a/chrome/browser/cocoa/browser_window_controller.mm
+++ b/chrome/browser/cocoa/browser_window_controller.mm
@@ -370,8 +370,7 @@
// from this method.
- (void)windowWillClose:(NSNotification*)notification {
DCHECK_EQ([notification object], [self window]);
- DCHECK(!browser_->tabstrip_model()->HasNonPhantomTabs() ||
- !browser_->tabstrip_model()->count());
+ DCHECK(browser_->tabstrip_model()->empty());
[savedRegularWindow_ close];
// We delete statusBubble here because we need to kill off the dependency
// that its window has on our window before our window goes away.
@@ -417,7 +416,7 @@
// have to save the window position before we call orderOut:.
[self saveWindowPositionIfNeeded];
- if (browser_->tabstrip_model()->HasNonPhantomTabs()) {
+ if (!browser_->tabstrip_model()->empty()) {
// Tab strip isn't empty. Hide the frame (so it appears to have closed
// immediately) and close all the tabs, allowing the renderers to shut
// down. When the tab strip is empty we'll be called back again.
@@ -1271,12 +1270,12 @@
}
- (NSInteger)numberOfTabs {
- // count() includes pinned tabs (both live and phantom).
+ // count() includes pinned tabs.
return browser_->tabstrip_model()->count();
}
- (BOOL)hasLiveTabs {
- return browser_->tabstrip_model()->HasNonPhantomTabs();
+ return !browser_->tabstrip_model()->empty();
}
- (NSString*)selectedTabTitle {
« no previous file with comments | « chrome/browser/browser_browsertest.cc ('k') | chrome/browser/cocoa/tab_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698