OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 1054 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1065 IDC_FOCUS_LOCATION); | 1065 IDC_FOCUS_LOCATION); |
1066 break; | 1066 break; |
1067 case IDC_FOCUS_SEARCH: | 1067 case IDC_FOCUS_SEARCH: |
1068 chrome::ExecuteCommand(ActivateOrCreateBrowser(lastProfile), | 1068 chrome::ExecuteCommand(ActivateOrCreateBrowser(lastProfile), |
1069 IDC_FOCUS_SEARCH); | 1069 IDC_FOCUS_SEARCH); |
1070 break; | 1070 break; |
1071 case IDC_NEW_INCOGNITO_WINDOW: | 1071 case IDC_NEW_INCOGNITO_WINDOW: |
1072 CreateBrowser(lastProfile->GetOffTheRecordProfile()); | 1072 CreateBrowser(lastProfile->GetOffTheRecordProfile()); |
1073 break; | 1073 break; |
1074 case IDC_RESTORE_TAB: | 1074 case IDC_RESTORE_TAB: |
1075 // There is only the native desktop on Mac. | 1075 chrome::OpenWindowWithRestoredTabs(lastProfile); |
1076 chrome::OpenWindowWithRestoredTabs(lastProfile, | |
1077 chrome::HOST_DESKTOP_TYPE_NATIVE); | |
1078 break; | 1076 break; |
1079 case IDC_OPEN_FILE: | 1077 case IDC_OPEN_FILE: |
1080 chrome::ExecuteCommand(CreateBrowser(lastProfile), IDC_OPEN_FILE); | 1078 chrome::ExecuteCommand(CreateBrowser(lastProfile), IDC_OPEN_FILE); |
1081 break; | 1079 break; |
1082 case IDC_CLEAR_BROWSING_DATA: { | 1080 case IDC_CLEAR_BROWSING_DATA: { |
1083 // There may not be a browser open, so use the default profile. | 1081 // There may not be a browser open, so use the default profile. |
1084 if (Browser* browser = ActivateBrowser(lastProfile)) { | 1082 if (Browser* browser = ActivateBrowser(lastProfile)) { |
1085 chrome::ShowClearBrowsingDataDialog(browser); | 1083 chrome::ShowClearBrowsingDataDialog(browser); |
1086 } else { | 1084 } else { |
1087 chrome::OpenClearBrowsingDataDialogWindow(lastProfile); | 1085 chrome::OpenClearBrowsingDataDialogWindow(lastProfile); |
(...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1705 | 1703 |
1706 //--------------------------------------------------------------------------- | 1704 //--------------------------------------------------------------------------- |
1707 | 1705 |
1708 namespace app_controller_mac { | 1706 namespace app_controller_mac { |
1709 | 1707 |
1710 bool IsOpeningNewWindow() { | 1708 bool IsOpeningNewWindow() { |
1711 return g_is_opening_new_window; | 1709 return g_is_opening_new_window; |
1712 } | 1710 } |
1713 | 1711 |
1714 } // namespace app_controller_mac | 1712 } // namespace app_controller_mac |
OLD | NEW |