| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #import "base/mac/cocoa_protocols.h" | 7 #import "base/mac/cocoa_protocols.h" |
| 8 #include "base/memory/scoped_nsobject.h" | 8 #include "base/memory/scoped_nsobject.h" |
| 9 | 9 |
| 10 @class AnimatableView; | 10 @class AnimatableView; |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 | 70 |
| 71 // Subclasses can override this method to add additional controls to | 71 // Subclasses can override this method to add additional controls to |
| 72 // the infobar view. This method is called by awakeFromNib. The | 72 // the infobar view. This method is called by awakeFromNib. The |
| 73 // default implementation does nothing. | 73 // default implementation does nothing. |
| 74 - (void)addAdditionalControls; | 74 - (void)addAdditionalControls; |
| 75 | 75 |
| 76 // Subclasses must override this method to perform cleanup just before the | 76 // Subclasses must override this method to perform cleanup just before the |
| 77 // infobar closes. | 77 // infobar closes. |
| 78 - (void)infobarWillClose; | 78 - (void)infobarWillClose; |
| 79 | 79 |
| 80 // Sets the info bar message to the specified |message|. | |
| 81 - (void)setLabelToMessage:(NSString*)message; | |
| 82 | |
| 83 // Removes the OK and Cancel buttons and resizes the textfield to use the | 80 // Removes the OK and Cancel buttons and resizes the textfield to use the |
| 84 // space. | 81 // space. |
| 85 - (void)removeButtons; | 82 - (void)removeButtons; |
| 86 | 83 |
| 87 @property(nonatomic, assign) id<InfoBarContainer> containerController; | 84 @property(nonatomic, assign) id<InfoBarContainer> containerController; |
| 88 @property(nonatomic, readonly) InfoBarDelegate* delegate; | 85 @property(nonatomic, readonly) InfoBarDelegate* delegate; |
| 89 | 86 |
| 90 @end | 87 @end |
| 91 | 88 |
| 92 ///////////////////////////////////////////////////////////////////////// | 89 ///////////////////////////////////////////////////////////////////////// |
| 93 // InfoBarController subclasses, one for each InfoBarDelegate | 90 // InfoBarController subclasses, one for each InfoBarDelegate |
| 94 // subclass. Each of these subclasses overrides addAdditionalControls to | 91 // subclass. Each of these subclasses overrides addAdditionalControls to |
| 95 // configure its view as necessary. | 92 // configure its view as necessary. |
| 96 | 93 |
| 97 @interface LinkInfoBarController : InfoBarController | 94 @interface LinkInfoBarController : InfoBarController |
| 98 // Called when there is a click on the link in the infobar. | 95 // Called when there is a click on the link in the infobar. |
| 99 - (void)linkClicked; | 96 - (void)linkClicked; |
| 100 @end | 97 @end |
| 101 | 98 |
| 102 | 99 |
| 103 @interface ConfirmInfoBarController : InfoBarController | 100 @interface ConfirmInfoBarController : InfoBarController |
| 104 // Called when the OK and Cancel buttons are clicked. | 101 // Called when the OK and Cancel buttons are clicked. |
| 105 - (IBAction)ok:(id)sender; | 102 - (IBAction)ok:(id)sender; |
| 106 - (IBAction)cancel:(id)sender; | 103 - (IBAction)cancel:(id)sender; |
| 107 // Called when there is a click on the link in the infobar. | 104 // Called when there is a click on the link in the infobar. |
| 108 - (void)linkClicked; | 105 - (void)linkClicked; |
| 109 @end | 106 @end |
| OLD | NEW |