| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 <Cocoa/Cocoa.h> | 5 #import <Cocoa/Cocoa.h> |
| 6 | 6 |
| 7 @class AnimatableView; | 7 @class AnimatableView; |
| 8 @class HoverCloseButton; |
| 8 @protocol InfoBarContainer; | 9 @protocol InfoBarContainer; |
| 9 class InfoBarDelegate; | 10 class InfoBarDelegate; |
| 11 @class InfoBarGradientView; |
| 10 | 12 |
| 11 // A controller for an infobar in the browser window. There is one | 13 // A controller for an infobar in the browser window. There is one |
| 12 // controller per infobar view. The base InfoBarController is able to | 14 // controller per infobar view. The base InfoBarController is able to |
| 13 // draw an icon, a text message, and a close button. Subclasses can | 15 // draw an icon, a text message, and a close button. Subclasses can |
| 14 // override addAdditionalControls to customize the UI. | 16 // override addAdditionalControls to customize the UI. |
| 15 @interface InfoBarController : NSViewController { | 17 @interface InfoBarController : NSViewController { |
| 16 @private | 18 @private |
| 17 id<InfoBarContainer> containerController_; // weak, owns us | 19 id<InfoBarContainer> containerController_; // weak, owns us |
| 18 BOOL infoBarClosing_; | 20 BOOL infoBarClosing_; |
| 19 | 21 |
| 20 @protected | 22 @protected |
| 21 InfoBarDelegate* delegate_; // weak | 23 InfoBarDelegate* delegate_; // weak |
| 22 IBOutlet NSView* infoBarView_; | 24 IBOutlet InfoBarGradientView* infoBarView_; |
| 23 IBOutlet NSImageView* image_; | 25 IBOutlet NSImageView* image_; |
| 24 IBOutlet NSTextField* label_; | 26 IBOutlet NSTextField* label_; |
| 25 IBOutlet NSButton* okButton_; | 27 IBOutlet NSButton* okButton_; |
| 26 IBOutlet NSButton* cancelButton_; | 28 IBOutlet NSButton* cancelButton_; |
| 29 IBOutlet HoverCloseButton* closeButton_; |
| 27 }; | 30 }; |
| 28 | 31 |
| 29 // Initializes a new InfoBarController. | 32 // Initializes a new InfoBarController. |
| 30 - (id)initWithDelegate:(InfoBarDelegate*)delegate; | 33 - (id)initWithDelegate:(InfoBarDelegate*)delegate; |
| 31 | 34 |
| 32 // Called when someone clicks on the ok or cancel buttons. Subclasses | 35 // Called when someone clicks on the ok or cancel buttons. Subclasses |
| 33 // must override if they do not hide the buttons. | 36 // must override if they do not hide the buttons. |
| 34 - (void)ok:(id)sender; | 37 - (void)ok:(id)sender; |
| 35 - (void)cancel:(id)sender; | 38 - (void)cancel:(id)sender; |
| 36 | 39 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 // Called when there is a click on the link in the infobar. | 75 // Called when there is a click on the link in the infobar. |
| 73 - (void)linkClicked; | 76 - (void)linkClicked; |
| 74 @end | 77 @end |
| 75 | 78 |
| 76 | 79 |
| 77 @interface ConfirmInfoBarController : InfoBarController | 80 @interface ConfirmInfoBarController : InfoBarController |
| 78 // Called when the ok and cancel buttons are clicked. | 81 // Called when the ok and cancel buttons are clicked. |
| 79 - (IBAction)ok:(id)sender; | 82 - (IBAction)ok:(id)sender; |
| 80 - (IBAction)cancel:(id)sender; | 83 - (IBAction)cancel:(id)sender; |
| 81 @end | 84 @end |
| OLD | NEW |