summaryrefslogtreecommitdiffstats
path: root/chrome/browser/app_controller_mac.h
diff options
context:
space:
mode:
authorpinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-27 13:04:00 +0000
committerpinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-27 13:04:00 +0000
commit449dd2fa0f79ea68566f04399b3860b59762bc62 (patch)
treef701362fb866e7dbd065db7a4b9d8881d24fb9c1 /chrome/browser/app_controller_mac.h
parentb004209b94e258e9ca5a2356e4bd108f8443e142 (diff)
downloadchromium_src-449dd2fa0f79ea68566f04399b3860b59762bc62.zip
chromium_src-449dd2fa0f79ea68566f04399b3860b59762bc62.tar.gz
chromium_src-449dd2fa0f79ea68566f04399b3860b59762bc62.tar.bz2
Fix issue where cmd-w was hard-coded to closing a browser tab regardless of the frontmost window type. Have cmd-key equiv correctly set depending on the window type and the number of tabs in the window. Broadcast notification when the number of tabs changes in the model. Disable "close tab" item when there's only 1 tab in the browser window.
BUG=10047 TEST=cmd-w correctly closes the expected thing (frontmost window, or tab in the frontmost window). close tab should be disabled when the frontmost tab is not a browser or if there is only 1 tab in the window. Review URL: http://codereview.chromium.org/115789 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16981 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/app_controller_mac.h')
-rw-r--r--chrome/browser/app_controller_mac.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/chrome/browser/app_controller_mac.h b/chrome/browser/app_controller_mac.h
index bf2aebc..e47bc00 100644
--- a/chrome/browser/app_controller_mac.h
+++ b/chrome/browser/app_controller_mac.h
@@ -34,6 +34,13 @@ class Profile;
// only needed during early startup, it points to a valid vector during early
// startup and is NULL during the rest of app execution.
scoped_ptr<std::vector<GURL> > pendingURLs_;
+
+ // Outlets for the close tab/window menu items so that we can adjust the
+ // commmand-key equivalent depending on the kind of window and how many
+ // tabs it has.
+ IBOutlet NSMenuItem* closeTabMenuItem_;
+ IBOutlet NSMenuItem* closeWindowMenuItem_;
+ BOOL fileMenuUpdatePending_; // ensure we only do this once per notificaion.
}
- (IBAction)quit:(id)sender;