Chromium Code Reviews| Index: chrome/browser/app_controller_mac.mm |
| =================================================================== |
| --- chrome/browser/app_controller_mac.mm (revision 26116) |
| +++ chrome/browser/app_controller_mac.mm (working copy) |
| @@ -4,7 +4,7 @@ |
| #import "chrome/browser/app_controller_mac.h" |
| -#include "app/l10n_util.h" |
| +#include "app/l10n_util_mac.h" |
| #include "base/command_line.h" |
| #include "base/mac_util.h" |
| #include "base/message_loop.h" |
| @@ -48,6 +48,7 @@ |
| - (void)windowLayeringDidChange:(NSNotification*)inNotification; |
| - (BOOL)userWillWaitForInProgressDownloads:(int)downloadCount; |
| - (BOOL)shouldQuitWithInProgressDownloads; |
| +- (NSMenu*)applicationDockMenu:(NSApplication*)sender; |
| @end |
| @implementation AppController |
| @@ -666,4 +667,28 @@ |
| [aboutController_ showWindow:self]; |
| } |
| +- (NSMenu*)applicationDockMenu:(id)sender { |
| + NSMenu* result = [[[NSMenu alloc] initWithTitle: @""] autorelease]; |
|
pink (ping after 24hrs)
2009/09/14 19:13:03
rather than autoreleasing, we prefer to use scoped
John Grabowski
2009/09/14 21:22:22
For this line here, I don't think so.
If it was a
sgk
2009/09/14 22:10:53
In fact, it does fail as you'd expect (message sen
|
| + NSString* titleStr; |
|
pink (ping after 24hrs)
2009/09/14 19:13:03
these should be declared on the same line as they
|
| + id item; |
| + |
| + titleStr = l10n_util::GetNSStringWithFixup(IDS_NEW_WINDOW_MAC); |
| + item = [[[NSMenuItem alloc] initWithTitle:titleStr |
| + action:@selector(commandDispatch:) |
| + keyEquivalent:@""] autorelease]; |
| + [item setTarget:self]; |
| + [item setTag:IDC_NEW_WINDOW]; |
| + [result addItem:item]; |
| + |
| + titleStr = l10n_util::GetNSStringWithFixup(IDS_NEW_INCOGNITO_WINDOW_MAC); |
| + item = [[[NSMenuItem alloc] initWithTitle:titleStr |
| + action:@selector(commandDispatch:) |
| + keyEquivalent:@""] autorelease]; |
| + [item setTarget:self]; |
| + [item setTag:IDC_NEW_INCOGNITO_WINDOW]; |
| + [result addItem:item]; |
| + |
| + return result; |
| +} |
| + |
| @end |