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

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

Issue 2691593002: Connect ContentSuggestionsMediator to the ContentService (Closed)
Patch Set: Address comments 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_SUGGESTION_H_ 5 #ifndef IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CONTENT_SUGGESTION_H_
6 #define IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CONTENT_SUGGESTION_H_ 6 #define IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CONTENT_SUGGESTION_H_
7 7
8 #import <UIKit/UIKit.h> 8 #import <UIKit/UIKit.h>
9 9
10 #import "ios/chrome/browser/ui/collection_view/collection_view_model.h"
11 #include "url/gurl.h"
12
13 @class ContentSuggestionsImageUpdater;
14 @class ContentSuggestionsSectionInformation;
15
16 // Enum defining the ItemType of this ContentSuggestionsCollectionUpdater.
17 typedef NS_ENUM(NSInteger, ContentSuggestionsItemType) {
18 ContentSuggestionsItemTypeText = kItemTypeEnumZero,
19 ContentSuggestionsItemTypeArticle,
20 ContentSuggestionsItemTypeExpand,
21 ContentSuggestionsItemTypeStack,
22 ContentSuggestionsItemTypeFavicon,
23 };
24
10 // Data for a suggestions item, compatible with Objective-C. 25 // Data for a suggestions item, compatible with Objective-C.
11 @interface ContentSuggestion : NSObject 26 @interface ContentSuggestion : NSObject
12 27
28 // Title of the suggestion.
13 @property(nonatomic, copy) NSString* title; 29 @property(nonatomic, copy) NSString* title;
stkhapugin 2017/02/14 16:34:18 Optional: this is a really small header, why don't
gambard 2017/02/15 10:17:56 Done.
30 // Text for the suggestion.
31 @property(nonatomic, copy) NSString* text;
32 // Image for the suggestion.
14 @property(nonatomic, strong) UIImage* image; 33 @property(nonatomic, strong) UIImage* image;
34 // URL associated with the suggestion.
35 @property(nonatomic, assign) GURL url;
36
37 // Section information in which this suggestion should be.
38 @property(nonatomic, strong) ContentSuggestionsSectionInformation* section;
39 @property(nonatomic, assign) ContentSuggestionsItemType type;
40
41 // Image updater for this suggestion. When setting this imageUpdater, the
42 // suggestion puts itself as delegate for it, and updates its image when the
43 // ImageUpdater receives a new one.
44 @property(nonatomic, strong) ContentSuggestionsImageUpdater* imageUpdater;
stkhapugin 2017/02/14 16:34:19 Discussed offline
gambard 2017/02/15 10:17:56 Done.
15 45
16 @end 46 @end
17 47
18 #endif // IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CONTENT_SUGGESTION_H_ 48 #endif // IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CONTENT_SUGGESTION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698