| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 #ifndef IOS_CHROME_BROWSER_INFOBARS_INFOBAR_CONTROLLER_H_ | 5 #ifndef IOS_CHROME_BROWSER_INFOBARS_INFOBAR_CONTROLLER_H_ |
| 6 #define IOS_CHROME_BROWSER_INFOBARS_INFOBAR_CONTROLLER_H_ | 6 #define IOS_CHROME_BROWSER_INFOBARS_INFOBAR_CONTROLLER_H_ |
| 7 | 7 |
| 8 #import <UIKit/UIKit.h> | 8 #import <UIKit/UIKit.h> |
| 9 #include "base/mac/scoped_nsobject.h" | 9 #include "base/mac/scoped_nsobject.h" |
| 10 | 10 |
| 11 @protocol InfoBarViewProtocol; | 11 @protocol InfoBarViewProtocol; |
| 12 class InfoBarViewDelegate; | 12 class InfoBarViewDelegate; |
| 13 namespace infobars { | 13 namespace infobars { |
| 14 class InfoBarDelegate; | 14 class InfoBarDelegate; |
| 15 } | 15 } |
| 16 | 16 |
| 17 // InfoBar for iOS acts as a UIViewController for InfoBarView. | 17 // InfoBar for iOS acts as a UIViewController for InfoBarView. |
| 18 @interface InfoBarController : NSObject | 18 @interface InfoBarController : NSObject |
| 19 | 19 |
| 20 @property(nonatomic, readonly) InfoBarViewDelegate* delegate; | 20 @property(nonatomic, readonly) InfoBarViewDelegate* delegate; |
| 21 | 21 |
| 22 - (instancetype)init NS_UNAVAILABLE; |
| 23 |
| 22 // Designated initializer. | 24 // Designated initializer. |
| 23 - (instancetype)initWithDelegate:(InfoBarViewDelegate*)delegate | 25 - (instancetype)initWithDelegate:(InfoBarViewDelegate*)delegate |
| 24 NS_DESIGNATED_INITIALIZER; | 26 NS_DESIGNATED_INITIALIZER; |
| 25 | 27 |
| 26 // Creates a view and lays out all the infobar elements in it. Will not add | 28 // Creates a view and lays out all the infobar elements in it. Will not add |
| 27 // it as a subview yet. This method must be overriden in subclasses. | 29 // it as a subview yet. This method must be overriden in subclasses. |
| 28 - (base::scoped_nsobject<UIView<InfoBarViewProtocol>>) | 30 - (base::scoped_nsobject<UIView<InfoBarViewProtocol>>) |
| 29 viewForDelegate:(infobars::InfoBarDelegate*)delegate | 31 viewForDelegate:(infobars::InfoBarDelegate*)delegate |
| 30 frame:(CGRect)bounds; | 32 frame:(CGRect)bounds; |
| 31 | 33 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 45 | 47 |
| 46 // Removes the view. | 48 // Removes the view. |
| 47 - (void)removeView; | 49 - (void)removeView; |
| 48 | 50 |
| 49 // Accesses the view. | 51 // Accesses the view. |
| 50 - (UIView<InfoBarViewProtocol>*)view; | 52 - (UIView<InfoBarViewProtocol>*)view; |
| 51 | 53 |
| 52 @end | 54 @end |
| 53 | 55 |
| 54 #endif // IOS_CHROME_BROWSER_INFOBARS_INFOBAR_CONTROLLER_H_ | 56 #endif // IOS_CHROME_BROWSER_INFOBARS_INFOBAR_CONTROLLER_H_ |
| OLD | NEW |