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

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

Issue 115789: Fix issue where cmd-w was hard-coded to closing a browser tab regardless of t... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 7 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/cocoa/tab_strip_controller.h ('k') | chrome/browser/cocoa/tab_strip_controller_unittest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/tab_strip_controller.mm
===================================================================
--- chrome/browser/cocoa/tab_strip_controller.mm (revision 16871)
+++ chrome/browser/cocoa/tab_strip_controller.mm (working copy)
@@ -22,6 +22,8 @@
#include "chrome/browser/tabs/tab_strip_model.h"
#include "grit/generated_resources.h"
+NSString* const kTabStripNumberOfTabsChanged = @"kTabStripNumberOfTabsChanged";
+
// A simple view class that prevents the windowserver from dragging the
// area behind tabs. Sometimes core animation confuses it.
@interface TabStripControllerDragBlockingView : NSView
@@ -337,6 +339,11 @@
if (!inForeground) {
[self layoutTabs];
}
+
+ // Send a broadcast that the number of tabs have changed.
+ [[NSNotificationCenter defaultCenter]
+ postNotificationName:kTabStripNumberOfTabsChanged
+ object:self];
}
// Called when a notification is received from the model to select a particular
@@ -397,6 +404,11 @@
// Once we're totally done with the tab, delete its controller
[tabArray_ removeObjectAtIndex:index];
+ // Send a broadcast that the number of tabs have changed.
+ [[NSNotificationCenter defaultCenter]
+ postNotificationName:kTabStripNumberOfTabsChanged
+ object:self];
+
[self layoutTabs];
}
« no previous file with comments | « chrome/browser/cocoa/tab_strip_controller.h ('k') | chrome/browser/cocoa/tab_strip_controller_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698