| OLD | NEW |
| (Empty) | |
| 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. |
| 4 |
| 5 #ifndef CHROME_BROWSER_UI_COCOA_CONFIRM_BUBBLE_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_UI_COCOA_CONFIRM_BUBBLE_CONTROLLER_H_ |
| 7 #pragma once |
| 8 |
| 9 #import <Cocoa/Cocoa.h> |
| 10 |
| 11 #import "base/mac/cocoa_protocols.h" |
| 12 |
| 13 class ConfirmBubbleModel; |
| 14 |
| 15 // A view controller that manages a bubble view and becomes a proxy between |
| 16 // the view and the ConfirmBubbleModel object. This class is internally used |
| 17 // in ConfirmBubbleView::Show() and users do not have to change this class |
| 18 // directly. |
| 19 @interface ConfirmBubbleController : |
| 20 NSViewController<NSTextViewDelegate> { |
| 21 @private |
| 22 NSView* parent_; // weak |
| 23 CGPoint origin_; |
| 24 ConfirmBubbleModel* model_; // weak |
| 25 } |
| 26 |
| 27 // Creates a ConfirmBubbleController object. |
| 28 - (id)initWithParent:(NSView*)parent |
| 29 origin:(CGPoint)origin |
| 30 model:(ConfirmBubbleModel*)model; |
| 31 |
| 32 // Access to the properties of the ConfirmBubbleModel object. These functions |
| 33 // also converts C++ types returned by the ConfirmBubbleModel object to |
| 34 // Objective-C types. |
| 35 - (NSPoint)origin; |
| 36 - (NSString*)title; |
| 37 - (NSString*)messageText; |
| 38 - (NSString*)linkText; |
| 39 - (NSString*)okButtonText; |
| 40 - (NSString*)cancelButtonText; |
| 41 - (BOOL)hasOkButton; |
| 42 - (BOOL)hasCancelButton; |
| 43 - (NSImage*)icon; |
| 44 |
| 45 // Handle actions from from the ConfirmBubbleView objet. |
| 46 - (void)accept; |
| 47 - (void)cancel; |
| 48 - (void)linkClicked; |
| 49 |
| 50 @end |
| 51 |
| 52 #endif // CHROME_BROWSER_UI_COCOA_CONFIRM_BUBBLE_CONTROLLER_H_ |
| OLD | NEW |