OLD | NEW |
---|---|
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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/ui/cocoa/browser_window_controller.h" | 5 #import "chrome/browser/ui/cocoa/browser_window_controller.h" |
6 | 6 |
7 #include <cmath> | 7 #include <cmath> |
8 #include <numeric> | 8 #include <numeric> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 1072 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1083 NSString* menuTitle = l10n_util::GetNSString( | 1083 NSString* menuTitle = l10n_util::GetNSString( |
1084 [self inPresentationMode] ? IDS_EXIT_PRESENTATION_MAC : | 1084 [self inPresentationMode] ? IDS_EXIT_PRESENTATION_MAC : |
1085 IDS_ENTER_PRESENTATION_MAC); | 1085 IDS_ENTER_PRESENTATION_MAC); |
1086 [static_cast<NSMenuItem*>(item) setTitle:menuTitle]; | 1086 [static_cast<NSMenuItem*>(item) setTitle:menuTitle]; |
1087 } | 1087 } |
1088 break; | 1088 break; |
1089 } | 1089 } |
1090 case IDC_SHOW_SIGNIN: { | 1090 case IDC_SHOW_SIGNIN: { |
1091 Profile* original_profile = | 1091 Profile* original_profile = |
1092 browser_->profile()->GetOriginalProfile(); | 1092 browser_->profile()->GetOriginalProfile(); |
1093 enable &= original_profile->IsSigninAllowed(); | |
sail
2013/02/08 20:18:57
Don't do this, if chrome::IsCommandEnabled() is no
Adrian Kuegel
2013/02/11 16:47:30
IsCommandEnabled should return the correct value,
| |
1093 [BrowserWindowController updateSigninItem:item | 1094 [BrowserWindowController updateSigninItem:item |
1094 shouldShow:enable | 1095 shouldShow:enable |
1095 currentProfile:original_profile]; | 1096 currentProfile:original_profile]; |
1096 break; | 1097 break; |
1097 } | 1098 } |
1098 default: | 1099 default: |
1099 // Special handling for the contents of the Text Encoding submenu. On | 1100 // Special handling for the contents of the Text Encoding submenu. On |
1100 // Mac OS, instead of enabling/disabling the top-level menu item, we | 1101 // Mac OS, instead of enabling/disabling the top-level menu item, we |
1101 // enable/disable the submenu's contents (per Apple's HIG). | 1102 // enable/disable the submenu's contents (per Apple's HIG). |
1102 EncodingMenuController encoding_controller; | 1103 EncodingMenuController encoding_controller; |
(...skipping 1107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2210 | 2211 |
2211 - (BOOL)supportsBookmarkBar { | 2212 - (BOOL)supportsBookmarkBar { |
2212 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; | 2213 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; |
2213 } | 2214 } |
2214 | 2215 |
2215 - (BOOL)isTabbedWindow { | 2216 - (BOOL)isTabbedWindow { |
2216 return browser_->is_type_tabbed(); | 2217 return browser_->is_type_tabbed(); |
2217 } | 2218 } |
2218 | 2219 |
2219 @end // @implementation BrowserWindowController(WindowType) | 2220 @end // @implementation BrowserWindowController(WindowType) |
OLD | NEW |