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

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

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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 003767c62be164a121582f188950ececc08fc928..62b96a96be7c9b520a8459cc1a6c736ffd24d4ad 100644
--- a/chrome/browser/ui/cocoa/exclusive_access_bubble_window_controller.mm
+++ b/chrome/browser/ui/cocoa/exclusive_access_bubble_window_controller.mm
@@ -53,7 +53,7 @@ const float kHideDuration = 0.7;
- (void)hideSoon;
// Returns the Accelerator for the Toggle Fullscreen menu item.
-+ (scoped_ptr<ui::PlatformAcceleratorCocoa>)acceleratorForToggleFullscreen;
++ (std::unique_ptr<ui::PlatformAcceleratorCocoa>)acceleratorForToggleFullscreen;
// Returns a string representation fit for display of
// +acceleratorForToggleFullscreen.
@@ -292,21 +292,22 @@ const float kHideDuration = 0.7;
// 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.
-+ (scoped_ptr<ui::PlatformAcceleratorCocoa>)acceleratorForToggleFullscreen {
++ (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 scoped_ptr<ui::PlatformAcceleratorCocoa>(
+ return std::unique_ptr<ui::PlatformAcceleratorCocoa>(
new ui::PlatformAcceleratorCocoa([item keyEquivalent],
[item keyEquivalentModifierMask]));
}
}
}
// Default to Cmd+Shift+F.
- return scoped_ptr<ui::PlatformAcceleratorCocoa>(
+ return std::unique_ptr<ui::PlatformAcceleratorCocoa>(
new ui::PlatformAcceleratorCocoa(@"f",
NSCommandKeyMask | NSShiftKeyMask));
}
@@ -315,7 +316,7 @@ const float kHideDuration = 0.7;
// key combination for quit. It then gets the modifiers and builds a string
// to display them.
+ (NSString*)keyCommandString {
- scoped_ptr<ui::PlatformAcceleratorCocoa> accelerator(
+ std::unique_ptr<ui::PlatformAcceleratorCocoa> accelerator(
[[self class] acceleratorForToggleFullscreen]);
return [[self class] keyCombinationForAccelerator:*accelerator];
}
« no previous file with comments | « chrome/browser/ui/cocoa/download/download_show_all_cell.h ('k') | chrome/browser/ui/cocoa/extensions/browser_action_button.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698