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

Unified Diff: chrome/browser/app_controller_mac.mm

Issue 199031: Add "New Window" and "New Incognito Window" items to the Dock Menu.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 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 25500)
+++ chrome/browser/app_controller_mac.mm (working copy)
@@ -47,6 +47,7 @@
- (void)windowLayeringDidChange:(NSNotification*)inNotification;
- (BOOL)userWillWaitForInProgressDownloads:(int)downloadCount;
- (BOOL)shouldQuitWithInProgressDownloads;
+- (NSMenu*)applicationDockMenu:(NSApplication*)sender;
@end
@implementation AppController
@@ -654,4 +655,30 @@
[aboutController_ showWindow:self];
}
+- (NSMenu*)applicationDockMenu:(id)sender {
+ NSMenu* result = [[[NSMenu alloc] initWithTitle: @""] autorelease];
+ NSString* titleStr;
+ id item;
+
+ titleStr = base::SysWideToNSString(
+ l10n_util::GetString(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 = base::SysWideToNSString(
+ l10n_util::GetString(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
« 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