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

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

Issue 10546072: Use different help URLs for menus, accelerators, and WebUI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 8 years, 6 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 | « chrome/app/chrome_dll.rc ('k') | chrome/browser/chromeos/system/ash_system_tray_delegate.cc » ('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) 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 "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 873 matching lines...) Expand 10 before | Expand all | Expand 10 after
884 browser->ShowDownloadsTab(); 884 browser->ShowDownloadsTab();
885 else 885 else
886 Browser::OpenDownloadsWindow(lastProfile); 886 Browser::OpenDownloadsWindow(lastProfile);
887 break; 887 break;
888 case IDC_MANAGE_EXTENSIONS: 888 case IDC_MANAGE_EXTENSIONS:
889 if (Browser* browser = ActivateBrowser(lastProfile)) 889 if (Browser* browser = ActivateBrowser(lastProfile))
890 browser->ShowExtensionsTab(); 890 browser->ShowExtensionsTab();
891 else 891 else
892 Browser::OpenExtensionsWindow(lastProfile); 892 Browser::OpenExtensionsWindow(lastProfile);
893 break; 893 break;
894 case IDC_HELP_PAGE: 894 case IDC_HELP_PAGE_VIA_MENU:
895 if (Browser* browser = ActivateBrowser(lastProfile)) 895 if (Browser* browser = ActivateBrowser(lastProfile))
896 browser->ShowHelpTab(); 896 browser->ShowHelpTab(Browser::HELP_SOURCE_MENU);
897 else 897 else
898 Browser::OpenHelpWindow(lastProfile); 898 Browser::OpenHelpWindow(lastProfile, Browser::HELP_SOURCE_MENU);
899 break; 899 break;
900 case IDC_SHOW_SYNC_SETUP: 900 case IDC_SHOW_SYNC_SETUP:
901 if (Browser* browser = ActivateBrowser(lastProfile)) 901 if (Browser* browser = ActivateBrowser(lastProfile))
902 browser->ShowSyncSetup(SyncPromoUI::SOURCE_MENU); 902 browser->ShowSyncSetup(SyncPromoUI::SOURCE_MENU);
903 else 903 else
904 Browser::OpenSyncSetupWindow(lastProfile, SyncPromoUI::SOURCE_MENU); 904 Browser::OpenSyncSetupWindow(lastProfile, SyncPromoUI::SOURCE_MENU);
905 break; 905 break;
906 case IDC_TASK_MANAGER: 906 case IDC_TASK_MANAGER:
907 content::RecordAction(UserMetricsAction("TaskManager")); 907 content::RecordAction(UserMetricsAction("TaskManager"));
908 TaskManagerMac::Show(false); 908 TaskManagerMac::Show(false);
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
1017 menuState_->UpdateCommandEnabled(IDC_NEW_INCOGNITO_WINDOW, true); 1017 menuState_->UpdateCommandEnabled(IDC_NEW_INCOGNITO_WINDOW, true);
1018 menuState_->UpdateCommandEnabled(IDC_OPEN_FILE, true); 1018 menuState_->UpdateCommandEnabled(IDC_OPEN_FILE, true);
1019 menuState_->UpdateCommandEnabled(IDC_CLEAR_BROWSING_DATA, true); 1019 menuState_->UpdateCommandEnabled(IDC_CLEAR_BROWSING_DATA, true);
1020 menuState_->UpdateCommandEnabled(IDC_RESTORE_TAB, false); 1020 menuState_->UpdateCommandEnabled(IDC_RESTORE_TAB, false);
1021 menuState_->UpdateCommandEnabled(IDC_FOCUS_LOCATION, true); 1021 menuState_->UpdateCommandEnabled(IDC_FOCUS_LOCATION, true);
1022 menuState_->UpdateCommandEnabled(IDC_FOCUS_SEARCH, true); 1022 menuState_->UpdateCommandEnabled(IDC_FOCUS_SEARCH, true);
1023 menuState_->UpdateCommandEnabled(IDC_SHOW_BOOKMARK_MANAGER, true); 1023 menuState_->UpdateCommandEnabled(IDC_SHOW_BOOKMARK_MANAGER, true);
1024 menuState_->UpdateCommandEnabled(IDC_SHOW_HISTORY, true); 1024 menuState_->UpdateCommandEnabled(IDC_SHOW_HISTORY, true);
1025 menuState_->UpdateCommandEnabled(IDC_SHOW_DOWNLOADS, true); 1025 menuState_->UpdateCommandEnabled(IDC_SHOW_DOWNLOADS, true);
1026 menuState_->UpdateCommandEnabled(IDC_MANAGE_EXTENSIONS, true); 1026 menuState_->UpdateCommandEnabled(IDC_MANAGE_EXTENSIONS, true);
1027 menuState_->UpdateCommandEnabled(IDC_HELP_PAGE, true); 1027 menuState_->UpdateCommandEnabled(IDC_HELP_PAGE_VIA_MENU, true);
1028 menuState_->UpdateCommandEnabled(IDC_IMPORT_SETTINGS, true); 1028 menuState_->UpdateCommandEnabled(IDC_IMPORT_SETTINGS, true);
1029 menuState_->UpdateCommandEnabled(IDC_FEEDBACK, true); 1029 menuState_->UpdateCommandEnabled(IDC_FEEDBACK, true);
1030 menuState_->UpdateCommandEnabled(IDC_SHOW_SYNC_SETUP, true); 1030 menuState_->UpdateCommandEnabled(IDC_SHOW_SYNC_SETUP, true);
1031 menuState_->UpdateCommandEnabled(IDC_TASK_MANAGER, true); 1031 menuState_->UpdateCommandEnabled(IDC_TASK_MANAGER, true);
1032 } 1032 }
1033 1033
1034 // Conditionally adds the Profile menu to the main menu bar. 1034 // Conditionally adds the Profile menu to the main menu bar.
1035 - (void)initProfileMenu { 1035 - (void)initProfileMenu {
1036 NSMenu* mainMenu = [NSApp mainMenu]; 1036 NSMenu* mainMenu = [NSApp mainMenu];
1037 NSMenuItem* profileMenu = [mainMenu itemWithTag:IDC_PROFILE_MAIN_MENU]; 1037 NSMenuItem* profileMenu = [mainMenu itemWithTag:IDC_PROFILE_MAIN_MENU];
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
1318 1318
1319 } // namespace browser 1319 } // namespace browser
1320 1320
1321 namespace app_controller_mac { 1321 namespace app_controller_mac {
1322 1322
1323 bool IsOpeningNewWindow() { 1323 bool IsOpeningNewWindow() {
1324 return g_is_opening_new_window; 1324 return g_is_opening_new_window;
1325 } 1325 }
1326 1326
1327 } // namespace app_controller_mac 1327 } // namespace app_controller_mac
OLDNEW
« no previous file with comments | « chrome/app/chrome_dll.rc ('k') | chrome/browser/chromeos/system/ash_system_tray_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698