OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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_UI_AUTHENTICATION_SIGN_PROMO_VIEW_H_ | 5 #ifndef IOS_CHROME_BROWSER_UI_AUTHENTICATION_SIGN_PROMO_VIEW_H_ |
6 #define IOS_CHROME_BROWSER_UI_AUTHENTICATION_SIGN_PROMO_VIEW_H_ | 6 #define IOS_CHROME_BROWSER_UI_AUTHENTICATION_SIGN_PROMO_VIEW_H_ |
7 | 7 |
8 #import <UIKit/UIKit.h> | 8 #import <UIKit/UIKit.h> |
9 | 9 |
10 #include "components/signin/core/browser/signin_metrics.h" | 10 #include "components/signin/core/browser/signin_metrics.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 // - the title for |primaryButton| | 33 // - the title for |primaryButton| |
34 // - the title for |secondaryButton| | 34 // - the title for |secondaryButton| |
35 @interface SigninPromoView : UIView | 35 @interface SigninPromoView : UIView |
36 | 36 |
37 @property(nonatomic, weak) id<SigninPromoViewDelegate> delegate; | 37 @property(nonatomic, weak) id<SigninPromoViewDelegate> delegate; |
38 @property(nonatomic) SigninPromoViewMode mode; | 38 @property(nonatomic) SigninPromoViewMode mode; |
39 @property(nonatomic, readonly) UIImageView* imageView; | 39 @property(nonatomic, readonly) UIImageView* imageView; |
40 @property(nonatomic, readonly) UILabel* textLabel; | 40 @property(nonatomic, readonly) UILabel* textLabel; |
41 @property(nonatomic, readonly) MDCFlatButton* primaryButton; | 41 @property(nonatomic, readonly) MDCFlatButton* primaryButton; |
42 @property(nonatomic, readonly) MDCFlatButton* secondaryButton; | 42 @property(nonatomic, readonly) MDCFlatButton* secondaryButton; |
| 43 // Hidden by default. |
| 44 @property(nonatomic, readonly) UIButton* closeButton; |
43 | 45 |
44 // Horizontal padding used for |textLabel|, |primaryButton| and | 46 // Horizontal padding used for |textLabel|, |primaryButton| and |
45 // |secondaryButton|. Used to compute the preferred max layout width of | 47 // |secondaryButton|. Used to compute the preferred max layout width of |
46 // |textLabel|. | 48 // |textLabel|. |
47 @property(nonatomic, readonly) CGFloat horizontalPadding; | 49 @property(nonatomic, readonly) CGFloat horizontalPadding; |
48 | 50 |
49 - (instancetype)initWithCoder:(NSCoder*)aDecoder NS_UNAVAILABLE; | 51 - (instancetype)initWithCoder:(NSCoder*)aDecoder NS_UNAVAILABLE; |
50 | 52 |
51 // Sets the image in |imageView|. This method will add a circular background | 53 // Sets the image in |imageView|. This method will add a circular background |
52 // using CircularImageFromImage() (so if the image is not squared, it will be | 54 // using CircularImageFromImage() (so if the image is not squared, it will be |
53 // cropped first). Must only be called in the "Warm State" mode. | 55 // cropped first). Must only be called in the "Warm State" mode. |
54 - (void)setProfileImage:(UIImage*)image; | 56 - (void)setProfileImage:(UIImage*)image; |
55 | 57 |
56 @end | 58 @end |
57 | 59 |
58 #endif // IOS_CHROME_BROWSER_UI_AUTHENTICATION_SIGN_PROMO_VIEW_H_ | 60 #endif // IOS_CHROME_BROWSER_UI_AUTHENTICATION_SIGN_PROMO_VIEW_H_ |
OLD | NEW |