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

Unified Diff: ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_cell.h

Issue 2887433002: Move the ContentSuggestions items to a new target (Closed)
Patch Set: Created 3 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
Index: ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_cell.h
diff --git a/ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_item.h b/ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_cell.h
similarity index 50%
copy from ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_item.h
copy to ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_cell.h
index 72a12b1e0955f98a2048d546a833021b80935f20..f5b1427d6eb5714237ae4225cd32fb7b9b15f2a9 100644
--- a/ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_item.h
+++ b/ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_cell.h
@@ -2,44 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CELLS_CONTENT_SUGGESTIONS_ITEM_H_
-#define IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CELLS_CONTENT_SUGGESTIONS_ITEM_H_
+#ifndef IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CELLS_CONTENT_SUGGESTIONS_CELL_H_
+#define IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CELLS_CONTENT_SUGGESTIONS_CELL_H_
-#import "ios/chrome/browser/ui/collection_view/cells/collection_view_item.h"
-#import "ios/chrome/browser/ui/content_suggestions/cells/suggested_content.h"
#import "ios/third_party/material_components_ios/src/components/CollectionCells/src/MaterialCollectionCells.h"
-namespace base {
-class Time;
-}
-
-@class ContentSuggestionsItem;
-@class FaviconAttributes;
@class FaviconViewNew;
-class GURL;
-
-// Item for an article in the suggestions.
-@interface ContentSuggestionsItem : CollectionViewItem<SuggestedContent>
-
-// Initialize an article with a |title|, a |subtitle|, an |image| and the |url|
-// to the full article. |type| is the type of the item.
-- (instancetype)initWithType:(NSInteger)type
- title:(NSString*)title
- subtitle:(NSString*)subtitle
- url:(const GURL&)url NS_DESIGNATED_INITIALIZER;
-
-- (instancetype)initWithType:(NSInteger)type NS_UNAVAILABLE;
-
-@property(nonatomic, copy, readonly) NSString* title;
-@property(nonatomic, readonly, assign) GURL URL;
-@property(nonatomic, copy) NSString* publisher;
-@property(nonatomic, assign) base::Time publishDate;
-// Whether the suggestion has an image associated.
-@property(nonatomic, assign) BOOL hasImage;
-// Whether the suggestion is available offline. If YES, an icon is displayed.
-@property(nonatomic, assign) BOOL availableOffline;
-
-@end
// Corresponding cell for an article in the suggestions.
@interface ContentSuggestionsCell : MDCCollectionViewCell
@@ -56,7 +24,7 @@ class GURL;
// Sets the publisher |name| and |date| and add an icon to signal the offline
// availability if |availableOffline| is YES.
- (void)setAdditionalInformationWithPublisherName:(NSString*)publisherName
- date:(base::Time)publishDate
+ date:(NSDate*)publishDate
offlineAvailability:(BOOL)availableOffline;
// Setst the subtitle text. If |subtitle| is nil, the space taken by the
@@ -65,4 +33,4 @@ class GURL;
@end
-#endif // IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CELLS_CONTENT_SUGGESTIONS_ITEM_H_
+#endif // IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CELLS_CONTENT_SUGGESTIONS_CELL_H_

Powered by Google App Engine
This is Rietveld 408576698