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

Unified Diff: chrome/browser/app_controller_mac.mm

Issue 256054: Explicitly activeIgnoringOtherApps from IDC_NEW{,_INCOGNITO}_WINDOW... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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 | « no previous file | chrome/browser/app_controller_mac_unittest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/app_controller_mac.mm
===================================================================
--- chrome/browser/app_controller_mac.mm (revision 28089)
+++ chrome/browser/app_controller_mac.mm (working copy)
@@ -448,6 +448,8 @@
enable = YES;
} else if (action == @selector(orderFrontStandardAboutPanel:)) {
enable = YES;
+ } else if (action == @selector(newWindowFromDock:)) {
+ enable = YES;
}
return enable;
}
@@ -667,12 +669,18 @@
[aboutController_ showWindow:self];
}
+// Explicitly bring to the foreground when creating new windows from the dock.
+- (void)newWindowFromDock:(id)sender {
+ [NSApp activateIgnoringOtherApps:YES];
+ [self commandDispatch:sender];
+}
+
- (NSMenu*)applicationDockMenu:(id)sender {
NSMenu* dockMenu = [[[NSMenu alloc] initWithTitle: @""] autorelease];
NSString* titleStr = l10n_util::GetNSStringWithFixup(IDS_NEW_WINDOW_MAC);
scoped_nsobject<NSMenuItem> item([[NSMenuItem alloc]
initWithTitle:titleStr
- action:@selector(commandDispatch:)
+ action:@selector(newWindowFromDock:)
keyEquivalent:@""]);
[item setTarget:self];
[item setTag:IDC_NEW_WINDOW];
@@ -680,7 +688,7 @@
titleStr = l10n_util::GetNSStringWithFixup(IDS_NEW_INCOGNITO_WINDOW_MAC);
item.reset([[NSMenuItem alloc] initWithTitle:titleStr
- action:@selector(commandDispatch:)
+ action:@selector(newWindowFromDock:)
keyEquivalent:@""]);
[item setTarget:self];
[item setTag:IDC_NEW_INCOGNITO_WINDOW];
« no previous file with comments | « no previous file | chrome/browser/app_controller_mac_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698