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

Unified Diff: ios/chrome/browser/favicon/favicon_attributes.mm

Issue 2787503002: Move FaviconAttributes to UI (Closed)
Patch Set: Add blank line Created 3 years, 9 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
Index: ios/chrome/browser/favicon/favicon_attributes.mm
diff --git a/ios/chrome/browser/favicon/favicon_attributes.mm b/ios/chrome/browser/favicon/favicon_attributes.mm
deleted file mode 100644
index 3659175746a1da3b568bc98abf3e1e096cb069ef..0000000000000000000000000000000000000000
--- a/ios/chrome/browser/favicon/favicon_attributes.mm
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#import "ios/chrome/browser/favicon/favicon_attributes.h"
-
-#include "base/logging.h"
-
-#if !defined(__has_feature) || !__has_feature(objc_arc)
-#error "This file requires ARC support."
-#endif
-
-@implementation FaviconAttributes
-@synthesize faviconImage = _faviconImage;
-@synthesize monogramString = _monogramString;
-@synthesize textColor = _textColor;
-@synthesize backgroundColor = _backgroundColor;
-
-- (instancetype)initWithImage:(UIImage*)image
- monogram:(NSString*)monogram
- textColor:(UIColor*)textColor
- backgroundColor:(UIColor*)backgroundColor {
- DCHECK(image || (monogram && textColor && backgroundColor));
- self = [super init];
- if (self) {
- _faviconImage = image;
- _monogramString = [monogram copy];
- _textColor = textColor;
- _backgroundColor = backgroundColor;
- }
-
- return self;
-}
-
-- (instancetype)initWithImage:(UIImage*)image {
- DCHECK(image);
- return
- [self initWithImage:image monogram:nil textColor:nil backgroundColor:nil];
-}
-
-- (instancetype)initWithMonogram:(NSString*)monogram
- textColor:(UIColor*)textColor
- backgroundColor:(UIColor*)backgroundColor {
- DCHECK(monogram && textColor && backgroundColor);
- return [self initWithImage:nil
- monogram:monogram
- textColor:textColor
- backgroundColor:backgroundColor];
-}
-
-+ (instancetype)attributesWithImage:(UIImage*)image {
- return [[self alloc] initWithImage:image];
-}
-
-+ (instancetype)attributesWithMonogram:(NSString*)monogram
- textColor:(UIColor*)textColor
- backgroundColor:(UIColor*)backgroundColor {
- return [[self alloc] initWithMonogram:monogram
- textColor:textColor
- backgroundColor:backgroundColor];
-}
-
-@end
« no previous file with comments | « ios/chrome/browser/favicon/favicon_attributes.h ('k') | ios/chrome/browser/favicon/favicon_attributes_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698