summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorpinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-11 16:26:26 +0000
committerpinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-11 16:26:26 +0000
commit419eb2a7c0a4186d43a9b9d68aaf24a22fff9855 (patch)
tree616fc1f51a1774b2909f70c350956c852655ceca /chrome
parent680383acda7ddf2a5a1b9f910e77054ce359b748 (diff)
downloadchromium_src-419eb2a7c0a4186d43a9b9d68aaf24a22fff9855.zip
chromium_src-419eb2a7c0a4186d43a9b9d68aaf24a22fff9855.tar.gz
chromium_src-419eb2a7c0a4186d43a9b9d68aaf24a22fff9855.tar.bz2
Allow new window creation when the frontmost browser has a modal sheet attached.
BUG=27379 TEST=creating new windows with app modals, tab modal, window modals Review URL: http://codereview.chromium.org/387025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31667 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/app_controller_mac.mm12
1 files changed, 5 insertions, 7 deletions
diff --git a/chrome/browser/app_controller_mac.mm b/chrome/browser/app_controller_mac.mm
index d24cd7a..4d36d3d 100644
--- a/chrome/browser/app_controller_mac.mm
+++ b/chrome/browser/app_controller_mac.mm
@@ -463,18 +463,16 @@ static bool g_is_opening_new_window = false;
NSInteger tag = [item tag];
if (menuState_->SupportsCommand(tag)) {
switch (tag) {
+ // The File Menu commands are not automatically disabled by Cocoa when a
+ // dialog sheet obscures the browser window, so we disable several of
+ // them here. We don't need to include IDC_CLOSE_WINDOW, because
+ // app_controller is only activated when there are no key windows (see
+ // function comment).
case IDC_RESTORE_TAB:
enable = [self keyWindowIsMissingOrBlocked] && [self canRestoreTab];
break;
- // The File Menu commands are not automatically disabled by Cocoa when
- // a dialog sheet obscures the browser window, so we disable them here.
- // We don't need to include IDC_CLOSE_WINDOW, because app_controller
- // is only activated when there are no key windows (see function
- // comment).
case IDC_OPEN_FILE:
- case IDC_NEW_WINDOW:
case IDC_NEW_TAB:
- case IDC_NEW_INCOGNITO_WINDOW:
enable = [self keyWindowIsMissingOrBlocked];
break;
default: