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

Unified Diff: chrome/browser/ui/cocoa/exclusive_access_bubble_window_controller.mm

Issue 1886463003: Remove the Presentation Mode Command ID (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed some 10.6 logic Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/exclusive_access_bubble_window_controller.mm
diff --git a/chrome/browser/ui/cocoa/exclusive_access_bubble_window_controller.mm b/chrome/browser/ui/cocoa/exclusive_access_bubble_window_controller.mm
index 62b96a96be7c9b520a8459cc1a6c736ffd24d4ad..b79405334447bbb49651a44995562f3b729c4a9a 100644
--- a/chrome/browser/ui/cocoa/exclusive_access_bubble_window_controller.mm
+++ b/chrome/browser/ui/cocoa/exclusive_access_bubble_window_controller.mm
@@ -52,13 +52,6 @@ const float kHideDuration = 0.7;
- (void)hideSoon;
-// Returns the Accelerator for the Toggle Fullscreen menu item.
-+ (std::unique_ptr<ui::PlatformAcceleratorCocoa>)acceleratorForToggleFullscreen;
-
-// Returns a string representation fit for display of
-// +acceleratorForToggleFullscreen.
-+ (NSString*)keyCommandString;
-
+ (NSString*)keyCombinationForAccelerator:
(const ui::PlatformAcceleratorCocoa&)item;
@end
@@ -289,38 +282,6 @@ const float kHideDuration = 0.7;
bubbleType_, url_, registry));
}
-// This looks at the Main Menu and determines what the user has set as the
-// key combination for quit. It then gets the modifiers and builds an object
-// to hold the data.
-+ (std::unique_ptr<ui::PlatformAcceleratorCocoa>)
- acceleratorForToggleFullscreen {
- NSMenu* mainMenu = [NSApp mainMenu];
- // Get the application menu (i.e. Chromium).
- for (NSMenuItem* menu in [mainMenu itemArray]) {
- for (NSMenuItem* item in [[menu submenu] itemArray]) {
- // Find the toggle presentation mode item.
- if ([item tag] == IDC_PRESENTATION_MODE) {
- return std::unique_ptr<ui::PlatformAcceleratorCocoa>(
- new ui::PlatformAcceleratorCocoa([item keyEquivalent],
- [item keyEquivalentModifierMask]));
- }
- }
- }
- // Default to Cmd+Shift+F.
- return std::unique_ptr<ui::PlatformAcceleratorCocoa>(
- new ui::PlatformAcceleratorCocoa(@"f",
- NSCommandKeyMask | NSShiftKeyMask));
-}
-
-// This looks at the Main Menu and determines what the user has set as the
-// key combination for quit. It then gets the modifiers and builds a string
-// to display them.
-+ (NSString*)keyCommandString {
- std::unique_ptr<ui::PlatformAcceleratorCocoa> accelerator(
- [[self class] acceleratorForToggleFullscreen]);
- return [[self class] keyCombinationForAccelerator:*accelerator];
-}
-
+ (NSString*)keyCombinationForAccelerator:
(const ui::PlatformAcceleratorCocoa&)item {
NSMutableString* string = [NSMutableString string];

Powered by Google App Engine
This is Rietveld 408576698