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

Side by Side Diff: chrome/browser/ui/cocoa/infobars/infobar_cocoa.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #include "chrome/browser/ui/cocoa/infobars/infobar_cocoa.h" 5 #include "chrome/browser/ui/cocoa/infobars/infobar_cocoa.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #import "chrome/browser/ui/cocoa/infobars/infobar_controller.h" 9 #import "chrome/browser/ui/cocoa/infobars/infobar_controller.h"
10 10
11 InfoBarCocoa::InfoBarCocoa(scoped_ptr<infobars::InfoBarDelegate> delegate) 11 InfoBarCocoa::InfoBarCocoa(std::unique_ptr<infobars::InfoBarDelegate> delegate)
12 : infobars::InfoBar(std::move(delegate)), weak_ptr_factory_(this) {} 12 : infobars::InfoBar(std::move(delegate)), weak_ptr_factory_(this) {}
13 13
14 InfoBarCocoa::~InfoBarCocoa() { 14 InfoBarCocoa::~InfoBarCocoa() {
15 if (controller()) 15 if (controller())
16 [controller() infobarWillClose]; 16 [controller() infobarWillClose];
17 } 17 }
18 18
19 infobars::InfoBarManager* InfoBarCocoa::OwnerCocoa() { return owner(); } 19 infobars::InfoBarManager* InfoBarCocoa::OwnerCocoa() { return owner(); }
20 20
21 base::WeakPtr<InfoBarCocoa> InfoBarCocoa::GetWeakPtr() { 21 base::WeakPtr<InfoBarCocoa> InfoBarCocoa::GetWeakPtr() {
22 return weak_ptr_factory_.GetWeakPtr(); 22 return weak_ptr_factory_.GetWeakPtr();
23 } 23 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/infobars/infobar_cocoa.h ('k') | chrome/browser/ui/cocoa/infobars/infobar_container_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698