Revert of Add button to add new FSP services to Files app. (patchset #8 id:140001...
[chromium-blink-merge.git] / chrome / browser / ui / cocoa / confirm_bubble_controller.h
blobbbddce070e57f03ac4ecaba12f2bf90a6f2e4e20
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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UI_COCOA_CONFIRM_BUBBLE_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_COCOA_CONFIRM_BUBBLE_CONTROLLER_H_
8 #import <Cocoa/Cocoa.h>
10 #include "base/memory/scoped_ptr.h"
12 class ConfirmBubbleModel;
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
16 // in ShowConfirmBubble() and users do not have to change this class directly.
17 @interface ConfirmBubbleController :
18 NSViewController<NSTextViewDelegate> {
19 @private
20 NSView* parent_; // weak
21 CGPoint origin_;
22 scoped_ptr<ConfirmBubbleModel> model_;
25 // Creates a ConfirmBubbleController object. The ConfirmBubbleController
26 // controller takes the ownership of the passed-in ConfirmBubbleModel.
27 - (id)initWithParent:(NSView*)parent
28 origin:(CGPoint)origin
29 model:(scoped_ptr<ConfirmBubbleModel>)model;
31 // Access to the properties of the ConfirmBubbleModel object. These functions
32 // also converts C++ types returned by the ConfirmBubbleModel object to
33 // Objective-C types.
34 - (NSPoint)origin;
35 - (NSString*)title;
36 - (NSString*)messageText;
37 - (NSString*)linkText;
38 - (NSString*)okButtonText;
39 - (NSString*)cancelButtonText;
40 - (BOOL)hasOkButton;
41 - (BOOL)hasCancelButton;
42 - (NSImage*)icon;
44 // Handle actions from the ConfirmBubbleCocoa objet.
45 - (void)accept;
46 - (void)cancel;
47 - (void)linkClicked;
49 @end
51 #endif // CHROME_BROWSER_UI_COCOA_CONFIRM_BUBBLE_CONTROLLER_H_