| 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 1130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1141 } | 1141 } |
| 1142 case IDC_PRESENTATION_MODE: { | 1142 case IDC_PRESENTATION_MODE: { |
| 1143 if (NSMenuItem* menuItem = base::mac::ObjCCast<NSMenuItem>(item)) { | 1143 if (NSMenuItem* menuItem = base::mac::ObjCCast<NSMenuItem>(item)) { |
| 1144 [menuItem setTitle:[self titleForFullscreenMenuItem]]; | 1144 [menuItem setTitle:[self titleForFullscreenMenuItem]]; |
| 1145 | 1145 |
| 1146 if (chrome::mac::SupportsSystemFullscreen()) | 1146 if (chrome::mac::SupportsSystemFullscreen()) |
| 1147 [menuItem setAlternate:YES]; | 1147 [menuItem setAlternate:YES]; |
| 1148 } | 1148 } |
| 1149 break; | 1149 break; |
| 1150 } | 1150 } |
| 1151 case IDC_SHOW_SIGNIN: { |
| 1152 Profile* original_profile = |
| 1153 browser_->profile()->GetOriginalProfile(); |
| 1154 [AppController updateSigninItem:item |
| 1155 shouldShow:enable |
| 1156 currentProfile:original_profile]; |
| 1157 break; |
| 1158 } |
| 1151 case IDC_BOOKMARK_PAGE: { | 1159 case IDC_BOOKMARK_PAGE: { |
| 1152 // Extensions have the ability to hide the bookmark page menu item. | 1160 // Extensions have the ability to hide the bookmark page menu item. |
| 1153 // This only affects the bookmark page menu item under the main menu. | 1161 // This only affects the bookmark page menu item under the main menu. |
| 1154 // The bookmark page menu item under the wrench menu has its | 1162 // The bookmark page menu item under the wrench menu has its |
| 1155 // visibility controlled by WrenchMenuModel. | 1163 // visibility controlled by WrenchMenuModel. |
| 1156 bool shouldHide = | 1164 bool shouldHide = |
| 1157 chrome::ShouldRemoveBookmarkThisPageUI(browser_->profile()); | 1165 chrome::ShouldRemoveBookmarkThisPageUI(browser_->profile()); |
| 1158 NSMenuItem* menuItem = base::mac::ObjCCast<NSMenuItem>(item); | 1166 NSMenuItem* menuItem = base::mac::ObjCCast<NSMenuItem>(item); |
| 1159 [menuItem setHidden:shouldHide]; | 1167 [menuItem setHidden:shouldHide]; |
| 1160 break; | 1168 break; |
| (...skipping 1098 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2259 | 2267 |
| 2260 - (BOOL)supportsBookmarkBar { | 2268 - (BOOL)supportsBookmarkBar { |
| 2261 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; | 2269 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; |
| 2262 } | 2270 } |
| 2263 | 2271 |
| 2264 - (BOOL)isTabbedWindow { | 2272 - (BOOL)isTabbedWindow { |
| 2265 return browser_->is_type_tabbed(); | 2273 return browser_->is_type_tabbed(); |
| 2266 } | 2274 } |
| 2267 | 2275 |
| 2268 @end // @implementation BrowserWindowController(WindowType) | 2276 @end // @implementation BrowserWindowController(WindowType) |
| OLD | NEW |