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

Side by Side Diff: chrome/browser/app_controller_mac.mm

Issue 200126: Stylistic fixes in the new dock menu code:... (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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/app_controller_mac_unittest.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "chrome/browser/app_controller_mac.h" 5 #import "chrome/browser/app_controller_mac.h"
6 6
7 #include "app/l10n_util_mac.h" 7 #include "app/l10n_util_mac.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/mac_util.h" 9 #include "base/mac_util.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after
645 selector:@selector(aboutWindowClosed:) 645 selector:@selector(aboutWindowClosed:)
646 name:kUserClosedAboutNotification 646 name:kUserClosedAboutNotification
647 object:aboutController_.get()]; 647 object:aboutController_.get()];
648 } 648 }
649 if (![[aboutController_ window] isVisible]) 649 if (![[aboutController_ window] isVisible])
650 [[aboutController_ window] center]; 650 [[aboutController_ window] center];
651 [aboutController_ showWindow:self]; 651 [aboutController_ showWindow:self];
652 } 652 }
653 653
654 - (NSMenu*)applicationDockMenu:(id)sender { 654 - (NSMenu*)applicationDockMenu:(id)sender {
655 NSMenu* result = [[[NSMenu alloc] initWithTitle: @""] autorelease]; 655 NSMenu* dockMenu = [[[NSMenu alloc] initWithTitle: @""] autorelease];
656 NSString* titleStr; 656 NSString* titleStr = l10n_util::GetNSStringWithFixup(IDS_NEW_WINDOW_MAC);
657 id item; 657 scoped_nsobject<NSMenuItem> item([[NSMenuItem alloc]
658 658 initWithTitle:titleStr
659 titleStr = l10n_util::GetNSStringWithFixup(IDS_NEW_WINDOW_MAC); 659 action:@selector(commandDispatch:)
660 item = [[[NSMenuItem alloc] initWithTitle:titleStr 660 keyEquivalent:@""]);
661 action:@selector(commandDispatch:)
662 keyEquivalent:@""] autorelease];
663 [item setTarget:self]; 661 [item setTarget:self];
664 [item setTag:IDC_NEW_WINDOW]; 662 [item setTag:IDC_NEW_WINDOW];
665 [result addItem:item]; 663 [dockMenu addItem:item];
666 664
667 titleStr = l10n_util::GetNSStringWithFixup(IDS_NEW_INCOGNITO_WINDOW_MAC); 665 titleStr = l10n_util::GetNSStringWithFixup(IDS_NEW_INCOGNITO_WINDOW_MAC);
668 item = [[[NSMenuItem alloc] initWithTitle:titleStr 666 item.reset([[NSMenuItem alloc] initWithTitle:titleStr
669 action:@selector(commandDispatch:) 667 action:@selector(commandDispatch:)
670 keyEquivalent:@""] autorelease]; 668 keyEquivalent:@""]);
671 [item setTarget:self]; 669 [item setTarget:self];
672 [item setTag:IDC_NEW_INCOGNITO_WINDOW]; 670 [item setTag:IDC_NEW_INCOGNITO_WINDOW];
673 [result addItem:item]; 671 [dockMenu addItem:item];
674 672
675 return result; 673 return dockMenu;
676 } 674 }
677 675
678 @end 676 @end
OLDNEW
« 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