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

Side by Side Diff: chrome/browser/ui/cocoa/confirm_bubble_controller.h

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 #ifndef CHROME_BROWSER_UI_COCOA_CONFIRM_BUBBLE_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_UI_COCOA_CONFIRM_BUBBLE_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_COCOA_CONFIRM_BUBBLE_CONTROLLER_H_ 6 #define CHROME_BROWSER_UI_COCOA_CONFIRM_BUBBLE_CONTROLLER_H_
7 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include <memory>
11 11
12 class ConfirmBubbleModel; 12 class ConfirmBubbleModel;
13 13
14 // A view controller that manages a bubble view and becomes a proxy between 14 // A view controller that manages a bubble view and becomes a proxy between
15 // the view and the ConfirmBubbleModel object. This class is internally used 15 // the view and the ConfirmBubbleModel object. This class is internally used
16 // in ShowConfirmBubble() and users do not have to change this class directly. 16 // in ShowConfirmBubble() and users do not have to change this class directly.
17 @interface ConfirmBubbleController : 17 @interface ConfirmBubbleController :
18 NSViewController<NSTextViewDelegate> { 18 NSViewController<NSTextViewDelegate> {
19 @private 19 @private
20 NSView* parent_; // weak 20 NSView* parent_; // weak
21 CGPoint origin_; 21 CGPoint origin_;
22 scoped_ptr<ConfirmBubbleModel> model_; 22 std::unique_ptr<ConfirmBubbleModel> model_;
23 } 23 }
24 24
25 // Creates a ConfirmBubbleController object. The ConfirmBubbleController 25 // Creates a ConfirmBubbleController object. The ConfirmBubbleController
26 // controller takes the ownership of the passed-in ConfirmBubbleModel. 26 // controller takes the ownership of the passed-in ConfirmBubbleModel.
27 - (id)initWithParent:(NSView*)parent 27 - (id)initWithParent:(NSView*)parent
28 origin:(CGPoint)origin 28 origin:(CGPoint)origin
29 model:(scoped_ptr<ConfirmBubbleModel>)model; 29 model:(std::unique_ptr<ConfirmBubbleModel>)model;
30 30
31 // Access to the properties of the ConfirmBubbleModel object. These functions 31 // Access to the properties of the ConfirmBubbleModel object. These functions
32 // also converts C++ types returned by the ConfirmBubbleModel object to 32 // also converts C++ types returned by the ConfirmBubbleModel object to
33 // Objective-C types. 33 // Objective-C types.
34 - (NSPoint)origin; 34 - (NSPoint)origin;
35 - (NSString*)title; 35 - (NSString*)title;
36 - (NSString*)messageText; 36 - (NSString*)messageText;
37 - (NSString*)linkText; 37 - (NSString*)linkText;
38 - (NSString*)linkURL; 38 - (NSString*)linkURL;
39 - (NSString*)okButtonText; 39 - (NSString*)okButtonText;
40 - (NSString*)cancelButtonText; 40 - (NSString*)cancelButtonText;
41 - (BOOL)hasOkButton; 41 - (BOOL)hasOkButton;
42 - (BOOL)hasCancelButton; 42 - (BOOL)hasCancelButton;
43 43
44 // Handle actions from the ConfirmBubbleCocoa object. 44 // Handle actions from the ConfirmBubbleCocoa object.
45 - (void)accept; 45 - (void)accept;
46 - (void)cancel; 46 - (void)cancel;
47 - (void)linkClicked; 47 - (void)linkClicked;
48 48
49 @end 49 @end
50 50
51 #endif // CHROME_BROWSER_UI_COCOA_CONFIRM_BUBBLE_CONTROLLER_H_ 51 #endif // CHROME_BROWSER_UI_COCOA_CONFIRM_BUBBLE_CONTROLLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/confirm_bubble_cocoa.mm ('k') | chrome/browser/ui/cocoa/confirm_bubble_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698