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

Side by Side Diff: chrome/browser/ui/cocoa/infobars/alternate_nav_infobar_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 unified diff | Download patch
OLDNEW
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/infobars/alternate_nav_infobar_controller.h" 5 #import "chrome/browser/ui/cocoa/infobars/alternate_nav_infobar_controller.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 ui::WindowOpenDispositionFromNSEvent([NSApp currentEvent]); 56 ui::WindowOpenDispositionFromNSEvent([NSApp currentEvent]);
57 AlternateNavInfoBarDelegate* delegate = 57 AlternateNavInfoBarDelegate* delegate =
58 static_cast<AlternateNavInfoBarDelegate*>([self delegate]); 58 static_cast<AlternateNavInfoBarDelegate*>([self delegate]);
59 if (delegate->LinkClicked(disposition)) 59 if (delegate->LinkClicked(disposition))
60 [self removeSelf]; 60 [self removeSelf];
61 } 61 }
62 62
63 @end 63 @end
64 64
65 // static 65 // static
66 scoped_ptr<infobars::InfoBar> AlternateNavInfoBarDelegate::CreateInfoBar( 66 std::unique_ptr<infobars::InfoBar> AlternateNavInfoBarDelegate::CreateInfoBar(
67 scoped_ptr<AlternateNavInfoBarDelegate> delegate) { 67 std::unique_ptr<AlternateNavInfoBarDelegate> delegate) {
68 scoped_ptr<InfoBarCocoa> infobar(new InfoBarCocoa(std::move(delegate))); 68 std::unique_ptr<InfoBarCocoa> infobar(new InfoBarCocoa(std::move(delegate)));
69 base::scoped_nsobject<AlternateNavInfoBarController> controller( 69 base::scoped_nsobject<AlternateNavInfoBarController> controller(
70 [[AlternateNavInfoBarController alloc] initWithInfoBar:infobar.get()]); 70 [[AlternateNavInfoBarController alloc] initWithInfoBar:infobar.get()]);
71 infobar->set_controller(controller); 71 infobar->set_controller(controller);
72 return std::move(infobar); 72 return std::move(infobar);
73 } 73 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/info_bubble_window.h ('k') | chrome/browser/ui/cocoa/infobars/confirm_infobar_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698