Index: ios/chrome/browser/infobars/infobar_controller.h |
diff --git a/ios/chrome/browser/infobars/infobar_controller.h b/ios/chrome/browser/infobars/infobar_controller.h |
index 14b6ddac89a6e1a2e989de9491ef24736033434c..d29299ca26aa6bf274c42640f33bfd9b80524096 100644 |
--- a/ios/chrome/browser/infobars/infobar_controller.h |
+++ b/ios/chrome/browser/infobars/infobar_controller.h |
@@ -6,30 +6,33 @@ |
#define IOS_CHROME_BROWSER_INFOBARS_INFOBAR_CONTROLLER_H_ |
#import <UIKit/UIKit.h> |
- |
-#include "base/basictypes.h" |
#include "base/mac/scoped_nsobject.h" |
-#include "base/memory/scoped_ptr.h" |
-#include "components/infobars/core/infobar.h" |
@protocol InfoBarViewProtocol; |
class InfoBarViewDelegate; |
+namespace infobars { |
+class InfoBarDelegate; |
+} |
// InfoBar for iOS acts as a UIViewController for InfoBarView. |
-@interface InfoBarController : NSObject { |
- @protected |
- base::scoped_nsobject<UIView<InfoBarViewProtocol>> infoBarView_; |
- __weak InfoBarViewDelegate* delegate_; |
-} |
+@interface InfoBarController : NSObject |
+ |
+@property(nonatomic, readonly) InfoBarViewDelegate* delegate; |
+ |
+// Designated initializer. |
+- (instancetype)initWithDelegate:(InfoBarViewDelegate*)delegate |
+ NS_DESIGNATED_INITIALIZER; |
// Creates a view and lays out all the infobar elements in it. Will not add |
// it as a subview yet. This method must be overriden in subclasses. |
+- (base::scoped_nsobject<UIView<InfoBarViewProtocol>>) |
+ viewForDelegate:(infobars::InfoBarDelegate*)delegate |
+ frame:(CGRect)bounds; |
+ |
+// Creates the view. |
- (void)layoutForDelegate:(infobars::InfoBarDelegate*)delegate |
frame:(CGRect)bounds; |
-// Designated initializer. |
-- (instancetype)initWithDelegate:(InfoBarViewDelegate*)delegate; |
- |
// Detaches view from its delegate. |
// After this function is called, no user interaction can be handled. |
- (void)detachView; |
@@ -44,7 +47,7 @@ class InfoBarViewDelegate; |
- (void)removeView; |
// Accesses the view. |
-- (UIView*)view; |
+- (UIView<InfoBarViewProtocol>*)view; |
@end |