Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 462 - (void)commandDispatch:(id)sender { | 462 - (void)commandDispatch:(id)sender { |
| 463 Profile* defaultProfile = [self defaultProfile]; | 463 Profile* defaultProfile = [self defaultProfile]; |
| 464 | 464 |
| 465 NSInteger tag = [sender tag]; | 465 NSInteger tag = [sender tag]; |
| 466 switch (tag) { | 466 switch (tag) { |
| 467 case IDC_NEW_TAB: | 467 case IDC_NEW_TAB: |
| 468 case IDC_NEW_WINDOW: | 468 case IDC_NEW_WINDOW: |
| 469 Browser::OpenEmptyWindow(defaultProfile); | 469 Browser::OpenEmptyWindow(defaultProfile); |
| 470 break; | 470 break; |
| 471 case IDC_NEW_INCOGNITO_WINDOW: | 471 case IDC_NEW_INCOGNITO_WINDOW: |
| 472 Browser::OpenURLOffTheRecord(defaultProfile, GURL()); | 472 Browser::OpenEmptyWindow(defaultProfile->GetOffTheRecordProfile()); |
|
John Grabowski
2009/09/16 20:14:02
I don't believe this change makes any difference.
| |
| 473 break; | 473 break; |
| 474 case IDC_RESTORE_TAB: | 474 case IDC_RESTORE_TAB: |
| 475 Browser::OpenWindowWithRestoredTabs(defaultProfile); | 475 Browser::OpenWindowWithRestoredTabs(defaultProfile); |
| 476 break; | 476 break; |
| 477 case IDC_OPEN_FILE: | 477 case IDC_OPEN_FILE: |
| 478 Browser::OpenEmptyWindow(defaultProfile); | 478 Browser::OpenEmptyWindow(defaultProfile); |
| 479 BrowserList::GetLastActive()-> | 479 BrowserList::GetLastActive()-> |
| 480 ExecuteCommandWithDisposition(IDC_OPEN_FILE, CURRENT_TAB); | 480 ExecuteCommandWithDisposition(IDC_OPEN_FILE, CURRENT_TAB); |
| 481 break; | 481 break; |
| 482 case IDC_CLEAR_BROWSING_DATA: | 482 case IDC_CLEAR_BROWSING_DATA: |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 688 action:@selector(commandDispatch:) | 688 action:@selector(commandDispatch:) |
| 689 keyEquivalent:@""] autorelease]; | 689 keyEquivalent:@""] autorelease]; |
| 690 [item setTarget:self]; | 690 [item setTarget:self]; |
| 691 [item setTag:IDC_NEW_INCOGNITO_WINDOW]; | 691 [item setTag:IDC_NEW_INCOGNITO_WINDOW]; |
| 692 [result addItem:item]; | 692 [result addItem:item]; |
| 693 | 693 |
| 694 return result; | 694 return result; |
| 695 } | 695 } |
| 696 | 696 |
| 697 @end | 697 @end |
| OLD | NEW |