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

Side by Side Diff: chrome/browser/ui/cocoa/confirm_bubble_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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/confirm_bubble_controller.h" 5 #import "chrome/browser/ui/cocoa/confirm_bubble_controller.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/strings/sys_string_conversions.h" 9 #include "base/strings/sys_string_conversions.h"
10 #import "chrome/browser/ui/cocoa/browser_window_controller.h" 10 #import "chrome/browser/ui/cocoa/browser_window_controller.h"
11 #import "chrome/browser/ui/cocoa/confirm_bubble_cocoa.h" 11 #import "chrome/browser/ui/cocoa/confirm_bubble_cocoa.h"
12 #import "chrome/browser/ui/confirm_bubble_model.h" 12 #import "chrome/browser/ui/confirm_bubble_model.h"
13 #include "ui/gfx/geometry/point.h" 13 #include "ui/gfx/geometry/point.h"
14 #include "ui/gfx/image/image.h" 14 #include "ui/gfx/image/image.h"
15 15
16 @implementation ConfirmBubbleController 16 @implementation ConfirmBubbleController
17 17
18 - (id)initWithParent:(NSView*)parent 18 - (id)initWithParent:(NSView*)parent
19 origin:(CGPoint)origin 19 origin:(CGPoint)origin
20 model:(scoped_ptr<ConfirmBubbleModel>)model { 20 model:(std::unique_ptr<ConfirmBubbleModel>)model {
21 if ((self = [super initWithNibName:nil bundle:nil])) { 21 if ((self = [super initWithNibName:nil bundle:nil])) {
22 parent_ = parent; 22 parent_ = parent;
23 origin_ = origin; 23 origin_ = origin;
24 model_ = std::move(model); 24 model_ = std::move(model);
25 } 25 }
26 return self; 26 return self;
27 } 27 }
28 28
29 - (void)loadView { 29 - (void)loadView {
30 [self setView:[[[ConfirmBubbleCocoa alloc] initWithParent:parent_ 30 [self setView:[[[ConfirmBubbleCocoa alloc] initWithParent:parent_
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 82
83 - (void)cancel { 83 - (void)cancel {
84 model_->Cancel(); 84 model_->Cancel();
85 } 85 }
86 86
87 - (void)linkClicked { 87 - (void)linkClicked {
88 model_->LinkClicked(); 88 model_->LinkClicked();
89 } 89 }
90 90
91 @end 91 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/confirm_bubble_controller.h ('k') | chrome/browser/ui/cocoa/confirm_bubble_controller_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698