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

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

Issue 3142020: Changed ChromeOS status bar menu handlers to obey --enable-tabbed-options swi... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 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_resource.h ('k') | chrome/browser/browser.h » ('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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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.h" 7 #include "app/l10n_util.h"
8 #include "app/l10n_util_mac.h" 8 #include "app/l10n_util_mac.h"
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 #include "chrome/browser/sessions/tab_restore_service.h" 43 #include "chrome/browser/sessions/tab_restore_service.h"
44 #include "chrome/browser/sync/profile_sync_service.h" 44 #include "chrome/browser/sync/profile_sync_service.h"
45 #include "chrome/browser/sync/sync_ui_util.h" 45 #include "chrome/browser/sync/sync_ui_util.h"
46 #include "chrome/browser/sync/sync_ui_util_mac.h" 46 #include "chrome/browser/sync/sync_ui_util_mac.h"
47 #include "chrome/browser/tab_contents/tab_contents.h" 47 #include "chrome/browser/tab_contents/tab_contents.h"
48 #include "chrome/common/app_mode_common_mac.h" 48 #include "chrome/common/app_mode_common_mac.h"
49 #include "chrome/common/chrome_paths_internal.h" 49 #include "chrome/common/chrome_paths_internal.h"
50 #include "chrome/common/chrome_switches.h" 50 #include "chrome/common/chrome_switches.h"
51 #include "chrome/common/notification_service.h" 51 #include "chrome/common/notification_service.h"
52 #include "chrome/common/pref_names.h" 52 #include "chrome/common/pref_names.h"
53 #include "chrome/common/url_constants.h"
53 #include "grit/chromium_strings.h" 54 #include "grit/chromium_strings.h"
54 #include "grit/generated_resources.h" 55 #include "grit/generated_resources.h"
55 #include "net/base/net_util.h" 56 #include "net/base/net_util.h"
56 57
57 // 10.6 adds a public API for the Spotlight-backed search menu item in the Help 58 // 10.6 adds a public API for the Spotlight-backed search menu item in the Help
58 // menu. Provide the declaration so it can be called below when building with 59 // menu. Provide the declaration so it can be called below when building with
59 // the 10.5 SDK. 60 // the 10.5 SDK.
60 #if !defined(MAC_OS_X_VERSION_10_6) || \ 61 #if !defined(MAC_OS_X_VERSION_10_6) || \
61 MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_6 62 MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_6
62 @interface NSApplication (SnowLeopardSDKDeclarations) 63 @interface NSApplication (SnowLeopardSDKDeclarations)
(...skipping 901 matching lines...) Expand 10 before | Expand all | Expand 10 after
964 prefsController_ = nil; 965 prefsController_ = nil;
965 } 966 }
966 967
967 // Show the preferences window, or bring it to the front if it's already 968 // Show the preferences window, or bring it to the front if it's already
968 // visible. 969 // visible.
969 - (IBAction)showPreferences:(id)sender { 970 - (IBAction)showPreferences:(id)sender {
970 const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess(); 971 const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess();
971 if (parsed_command_line.HasSwitch(switches::kEnableTabbedOptions)) { 972 if (parsed_command_line.HasSwitch(switches::kEnableTabbedOptions)) {
972 if (Browser* browser = ActivateBrowser([self defaultProfile])) { 973 if (Browser* browser = ActivateBrowser([self defaultProfile])) {
973 // Show options tab in the active browser window. 974 // Show options tab in the active browser window.
974 browser->ShowOptionsTab(); 975 browser->ShowOptionsTab(chrome::kDefaultOptionsSubPage);
975 } else { 976 } else {
976 // No browser window, so create one for the options tab. 977 // No browser window, so create one for the options tab.
977 Browser::OpenOptionsWindow([self defaultProfile]); 978 Browser::OpenOptionsWindow([self defaultProfile]);
978 } 979 }
979 } else { 980 } else {
980 [self showPreferencesWindow:sender 981 [self showPreferencesWindow:sender
981 page:OPTIONS_PAGE_DEFAULT 982 page:OPTIONS_PAGE_DEFAULT
982 profile:[self defaultProfile]]; 983 profile:[self defaultProfile]];
983 } 984 }
984 } 985 }
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
1082 [appController showPreferencesWindow:nil page:page profile:profile]; 1083 [appController showPreferencesWindow:nil page:page profile:profile];
1083 } 1084 }
1084 1085
1085 namespace app_controller_mac { 1086 namespace app_controller_mac {
1086 1087
1087 bool IsOpeningNewWindow() { 1088 bool IsOpeningNewWindow() {
1088 return g_is_opening_new_window; 1089 return g_is_opening_new_window;
1089 } 1090 }
1090 1091
1091 } // namespace app_controller_mac 1092 } // namespace app_controller_mac
OLDNEW
« no previous file with comments | « chrome/app/chrome_dll_resource.h ('k') | chrome/browser/browser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698