Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(150)

Unified Diff: ios/chrome/browser/infobars/infobar_controller.h

Issue 1161243002: Fixit: Cleanup of InfoBarController. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adding mising forward declaration. Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/chrome/browser/infobars/infobar.mm ('k') | ios/chrome/browser/infobars/infobar_controller.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « ios/chrome/browser/infobars/infobar.mm ('k') | ios/chrome/browser/infobars/infobar_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698