| 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 #import "base/cocoa_protocols_mac.h" | 7 #import "base/cocoa_protocols_mac.h" |
| 8 #include "base/scoped_nsobject.h" | 8 #include "base/scoped_nsobject.h" |
| 9 | 9 |
| 10 @class AnimatableView; | 10 @class AnimatableView; |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 - (void)animateClosed; | 66 - (void)animateClosed; |
| 67 | 67 |
| 68 // Subclasses can override this method to add additional controls to | 68 // Subclasses can override this method to add additional controls to |
| 69 // the infobar view. This method is called by awakeFromNib. The | 69 // the infobar view. This method is called by awakeFromNib. The |
| 70 // default implementation does nothing. | 70 // default implementation does nothing. |
| 71 - (void)addAdditionalControls; | 71 - (void)addAdditionalControls; |
| 72 | 72 |
| 73 // Sets the info bar message to the specified |message|. | 73 // Sets the info bar message to the specified |message|. |
| 74 - (void)setLabelToMessage:(NSString*)message; | 74 - (void)setLabelToMessage:(NSString*)message; |
| 75 | 75 |
| 76 @property(assign, nonatomic) id<InfoBarContainer> containerController; | 76 @property(nonatomic, assign) id<InfoBarContainer> containerController; |
| 77 @property(readonly) InfoBarDelegate* delegate; | 77 @property(nonatomic, readonly) InfoBarDelegate* delegate; |
| 78 | 78 |
| 79 @end | 79 @end |
| 80 | 80 |
| 81 ///////////////////////////////////////////////////////////////////////// | 81 ///////////////////////////////////////////////////////////////////////// |
| 82 // InfoBarController subclasses, one for each InfoBarDelegate | 82 // InfoBarController subclasses, one for each InfoBarDelegate |
| 83 // subclass. Each of these subclasses overrides addAdditionalControls to | 83 // subclass. Each of these subclasses overrides addAdditionalControls to |
| 84 // configure its view as necessary. | 84 // configure its view as necessary. |
| 85 | 85 |
| 86 @interface AlertInfoBarController : InfoBarController | 86 @interface AlertInfoBarController : InfoBarController |
| 87 @end | 87 @end |
| 88 | 88 |
| 89 | 89 |
| 90 @interface LinkInfoBarController : InfoBarController | 90 @interface LinkInfoBarController : InfoBarController |
| 91 // Called when there is a click on the link in the infobar. | 91 // Called when there is a click on the link in the infobar. |
| 92 - (void)linkClicked; | 92 - (void)linkClicked; |
| 93 @end | 93 @end |
| 94 | 94 |
| 95 | 95 |
| 96 @interface ConfirmInfoBarController : InfoBarController | 96 @interface ConfirmInfoBarController : InfoBarController |
| 97 // Called when the ok and cancel buttons are clicked. | 97 // Called when the ok and cancel buttons are clicked. |
| 98 - (IBAction)ok:(id)sender; | 98 - (IBAction)ok:(id)sender; |
| 99 - (IBAction)cancel:(id)sender; | 99 - (IBAction)cancel:(id)sender; |
| 100 // Called when there is a click on the link in the infobar. | 100 // Called when there is a click on the link in the infobar. |
| 101 - (void)linkClicked; | 101 - (void)linkClicked; |
| 102 @end | 102 @end |
| OLD | NEW |