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

Side by Side Diff: ios/chrome/browser/ui/content_suggestions/content_suggestions_article_item.h

Issue 2691303002: Add context menu for ContentSuggestions (Closed)
Patch Set: Fix gn deps Created 3 years, 10 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 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_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_ARTICLE_IT EM_H_ 5 #ifndef IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_ARTICLE_IT EM_H_
6 #define IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_ARTICLE_IT EM_H_ 6 #define IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_ARTICLE_IT EM_H_
7 7
8 #import "ios/chrome/browser/ui/collection_view/cells/collection_view_item.h" 8 #import "ios/chrome/browser/ui/collection_view/cells/collection_view_item.h"
9 #import "ios/third_party/material_components_ios/src/components/CollectionCells/ src/MaterialCollectionCells.h" 9 #import "ios/third_party/material_components_ios/src/components/CollectionCells/ src/MaterialCollectionCells.h"
10 #include "url/gurl.h" 10 #include "url/gurl.h"
11 11
12 // Item for an article in the suggestions. 12 // Item for an article in the suggestions.
13 @interface ContentSuggestionsArticleItem : CollectionViewItem 13 @interface ContentSuggestionsArticleItem : CollectionViewItem
14 14
15 // Initialize an article with a |title|, a |subtitle|, an |image| and the |url| 15 // Initialize an article with a |title|, a |subtitle|, an |image| and the |url|
16 // to the full article. |type| is the type of the item. 16 // to the full article. |type| is the type of the item.
17 - (instancetype)initWithType:(NSInteger)type 17 - (instancetype)initWithType:(NSInteger)type
18 title:(NSString*)title 18 title:(NSString*)title
19 subtitle:(NSString*)subtitle 19 subtitle:(NSString*)subtitle
20 image:(UIImage*)image 20 image:(UIImage*)image
21 url:(const GURL&)url NS_DESIGNATED_INITIALIZER; 21 url:(const GURL&)url NS_DESIGNATED_INITIALIZER;
22 22
23 - (instancetype)initWithType:(NSInteger)type NS_UNAVAILABLE; 23 - (instancetype)initWithType:(NSInteger)type NS_UNAVAILABLE;
24 24
25 @property(nonatomic, copy, readonly) NSString* title;
25 @property(nonatomic, strong) UIImage* image; 26 @property(nonatomic, strong) UIImage* image;
26 @property(nonatomic, readonly, assign) GURL articleURL; 27 @property(nonatomic, readonly, assign) GURL articleURL;
27 28
28 @end 29 @end
29 30
30 // Corresponding cell for an article in the suggestions. 31 // Corresponding cell for an article in the suggestions.
31 @interface ContentSuggestionsArticleCell : MDCCollectionViewCell 32 @interface ContentSuggestionsArticleCell : MDCCollectionViewCell
32 33
33 @property(nonatomic, readonly, strong) UILabel* titleLabel; 34 @property(nonatomic, readonly, strong) UILabel* titleLabel;
34 @property(nonatomic, readonly, strong) UILabel* subtitleLabel; 35 @property(nonatomic, readonly, strong) UILabel* subtitleLabel;
35 @property(nonatomic, readonly, strong) UIImageView* imageView; 36 @property(nonatomic, readonly, strong) UIImageView* imageView;
36 37
37 @end 38 @end
38 39
39 #endif // IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_ARTICLE _ITEM_H_ 40 #endif // IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_ARTICLE _ITEM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698