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

Side by Side Diff: ios/chrome/browser/infobars/infobar_controller.h

Issue 2592113002: Remove legacy InfoBarViewProtocol. (Closed)
Patch Set: Rebase. Created 3 years, 11 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 unified diff | Download patch
OLDNEW
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 9
10 @protocol InfoBarViewProtocol; 10 @class InfoBarView;
11 class InfoBarViewDelegate; 11 class InfoBarViewDelegate;
12 namespace infobars { 12 namespace infobars {
13 class InfoBarDelegate; 13 class InfoBarDelegate;
14 } 14 }
15 15
16 // InfoBar for iOS acts as a UIViewController for InfoBarView. 16 // InfoBar for iOS acts as a UIViewController for InfoBarView.
17 @interface InfoBarController : NSObject 17 @interface InfoBarController : NSObject
18 18
19 @property(nonatomic, readonly) InfoBarViewDelegate* delegate; 19 @property(nonatomic, readonly) InfoBarViewDelegate* delegate;
20
20 // Designated initializer. 21 // Designated initializer.
21 - (instancetype)initWithDelegate:(InfoBarViewDelegate*)delegate 22 - (instancetype)initWithDelegate:(InfoBarViewDelegate*)delegate
22 NS_DESIGNATED_INITIALIZER; 23 NS_DESIGNATED_INITIALIZER;
23 24
24 - (instancetype)init NS_UNAVAILABLE; 25 - (instancetype)init NS_UNAVAILABLE;
25 26
26 // Creates a view and lays out all the infobar elements in it. Will not add 27 // 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. 28 // it as a subview yet. This method must be overriden in subclasses.
28 - (UIView<InfoBarViewProtocol>*)viewForDelegate: 29 - (InfoBarView*)viewForDelegate:(infobars::InfoBarDelegate*)delegate
29 (infobars::InfoBarDelegate*)delegate 30 frame:(CGRect)bounds;
30 frame:(CGRect)bounds;
31 31
32 // Creates the view. 32 // Creates the view.
33 - (void)layoutForDelegate:(infobars::InfoBarDelegate*)delegate 33 - (void)layoutForDelegate:(infobars::InfoBarDelegate*)delegate
34 frame:(CGRect)bounds; 34 frame:(CGRect)bounds;
35 35
36 // Detaches view from its delegate. 36 // Detaches view from its delegate.
37 // After this function is called, no user interaction can be handled. 37 // After this function is called, no user interaction can be handled.
38 - (void)detachView; 38 - (void)detachView;
39 39
40 // Returns the actual height in pixels of this infobar instance. 40 // Returns the actual height in pixels of this infobar instance.
41 - (int)barHeight; 41 - (int)barHeight;
42 42
43 // Adjusts visible portion of this infobar. 43 // Adjusts visible portion of this infobar.
44 - (void)onHeightsRecalculated:(int)newHeight; 44 - (void)onHeightsRecalculated:(int)newHeight;
45 45
46 // Removes the view. 46 // Removes the view.
47 - (void)removeView; 47 - (void)removeView;
48 48
49 // Accesses the view. 49 // Accesses the view.
50 - (UIView<InfoBarViewProtocol>*)view; 50 - (InfoBarView*)view;
51 51
52 @end 52 @end
53 53
54 #endif // IOS_CHROME_BROWSER_INFOBARS_INFOBAR_CONTROLLER_H_ 54 #endif // IOS_CHROME_BROWSER_INFOBARS_INFOBAR_CONTROLLER_H_
OLDNEW
« no previous file with comments | « ios/chrome/browser/infobars/infobar_container_view.mm ('k') | ios/chrome/browser/infobars/infobar_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698