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

Unified Diff: ios/chrome/browser/ui/favicon/favicon_attributes.h

Issue 2890193003: Open Most Visited items (Closed)
Patch Set: Fix showcase Created 3 years, 6 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/ui/favicon/OWNERS ('k') | ios/chrome/browser/ui/favicon/favicon_attributes.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/ui/favicon/favicon_attributes.h
diff --git a/ios/chrome/browser/ui/favicon/favicon_attributes.h b/ios/chrome/browser/ui/favicon/favicon_attributes.h
index e76ee6e57065c8ecd1383299d0e9f31e1961cb45..595b3146cf02458fb4561d172b02df50ececce84 100644
--- a/ios/chrome/browser/ui/favicon/favicon_attributes.h
+++ b/ios/chrome/browser/ui/favicon/favicon_attributes.h
@@ -13,32 +13,26 @@
// Favicon image. Can be nil. If it is nil, monogram string and color are
// guaranteed to be not nil.
-@property(nonatomic, readonly, strong) UIImage* faviconImage;
+@property(nonatomic, readonly, strong, nullable) UIImage* faviconImage;
// Favicon monogram. Only available when there is no image.
-@property(nonatomic, readonly, copy) NSString* monogramString;
+@property(nonatomic, readonly, copy, nullable) NSString* monogramString;
// Favicon monogram color. Only available when there is no image.
-@property(nonatomic, readonly, strong) UIColor* textColor;
+@property(nonatomic, readonly, strong, nullable) UIColor* textColor;
// Favicon monogram background color. Only available when there is no image.
-@property(nonatomic, readonly, strong) UIColor* backgroundColor;
-
-+ (instancetype)attributesWithImage:(UIImage*)image;
-+ (instancetype)attributesWithMonogram:(NSString*)monogram
- textColor:(UIColor*)textColor
- backgroundColor:(UIColor*)backgroundColor;
-
-// Designated initializer. Either |image| or all of |textColor|,
-// |backgroundColor| and |monogram| must be not nil.
-- (instancetype)initWithImage:(UIImage*)image
- monogram:(NSString*)monogram
- textColor:(UIColor*)textColor
- backgroundColor:(UIColor*)backgroundColor
- NS_DESIGNATED_INITIALIZER;
-- (instancetype)initWithImage:(UIImage*)image;
-- (instancetype)initWithMonogram:(NSString*)monogram
- textColor:(UIColor*)textColor
- backgroundColor:(UIColor*)backgroundColor;
-
-- (instancetype)init NS_UNAVAILABLE;
+@property(nonatomic, readonly, strong, nullable) UIColor* backgroundColor;
+// Whether the background color is the default one.Only available when there is
+// no image.
+@property(nonatomic, readonly, assign, getter=isDefaultBackgroundColor)
+ BOOL defaultBackgroundColor;
+
++ (nullable instancetype)attributesWithImage:(nonnull UIImage*)image;
++ (nullable instancetype)attributesWithMonogram:(nonnull NSString*)monogram
+ textColor:(nonnull UIColor*)textColor
+ backgroundColor:
+ (nonnull UIColor*)backgroundColor
+ defaultBackgroundColor:(BOOL)defaultBackgroundColor;
+
+- (nullable instancetype)init NS_UNAVAILABLE;
@end
#endif // IOS_CHROME_BROWSER_UI_FAVICON_FAVICON_ATTRIBUTES_H_
« no previous file with comments | « ios/chrome/browser/ui/favicon/OWNERS ('k') | ios/chrome/browser/ui/favicon/favicon_attributes.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698