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

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

Issue 2755383002: Add ContentSuggestion for ReadingList (Closed)
Patch Set: Rebase Created 3 years, 8 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
« no previous file with comments | « ios/chrome/browser/ui/content_suggestions/content_suggestions_view_controller.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_IDENTIFIER_CONTENT_SUGGESTIONS _SECTION_INFORMATION_H_ 5 #ifndef IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_IDENTIFIER_CONTENT_SUGGESTIONS _SECTION_INFORMATION_H_
6 #define IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_IDENTIFIER_CONTENT_SUGGESTIONS _SECTION_INFORMATION_H_ 6 #define IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_IDENTIFIER_CONTENT_SUGGESTIONS _SECTION_INFORMATION_H_
7 7
8 #import <Foundation/Foundation.h> 8 #import <Foundation/Foundation.h>
9 9
10 // Layout for the section and its items. 10 // Layout for the section and its items.
11 typedef NS_ENUM(NSInteger, ContentSuggestionsSectionLayout) { 11 typedef NS_ENUM(NSInteger, ContentSuggestionsSectionLayout) {
12 // Follows the card layout. 12 // Follows the card layout.
13 ContentSuggestionsSectionLayoutCard, 13 ContentSuggestionsSectionLayoutCard,
14 // No specific layout. 14 // No specific layout.
15 ContentSuggestionsSectionLayoutCustom, 15 ContentSuggestionsSectionLayoutCustom,
16 }; 16 };
17 17
18 // This enum is used for ordering the sections and as ID for the section. Make 18 // This enum is used for ordering the sections and as ID for the section. Make
19 // all sections in the same collection have different ID. 19 // all sections in the same collection have different ID.
20 // When adding a new kind of suggestions, add a new corresponding section. The 20 // When adding a new kind of suggestions, add a new corresponding section. The
21 // ordering is not persisted between launch, reordering is possible. 21 // ordering is not persisted between launch, reordering is possible.
22 typedef NS_ENUM(NSInteger, ContentSuggestionsSectionID) { 22 typedef NS_ENUM(NSInteger, ContentSuggestionsSectionID) {
23 ContentSuggestionsSectionBookmarks = 0, 23 ContentSuggestionsSectionBookmarks = 0,
24 ContentSuggestionsSectionArticles = 1, 24 ContentSuggestionsSectionArticles = 1,
25 ContentSuggestionsSectionReadingList = 2,
25 26
26 // Do not use this. It will trigger a DCHECK. 27 // Do not use this. It will trigger a DCHECK.
27 // Do not add value after this one. 28 // Do not add value after this one.
28 ContentSuggestionsSectionUnknown 29 ContentSuggestionsSectionUnknown
29 }; 30 };
30 31
31 // Contains the information needed to display the section. 32 // Contains the information needed to display the section.
32 @interface ContentSuggestionsSectionInformation : NSObject 33 @interface ContentSuggestionsSectionInformation : NSObject
33 34
34 - (instancetype)initWithSectionID:(ContentSuggestionsSectionID)sectionID 35 - (instancetype)initWithSectionID:(ContentSuggestionsSectionID)sectionID
(...skipping 11 matching lines...) Expand all
46 // Text to be displayed when the section is empty. 47 // Text to be displayed when the section is empty.
47 @property(nonatomic, copy) NSString* emptyText; 48 @property(nonatomic, copy) NSString* emptyText;
48 // If the section should be shown when empty at loading. If the section becomes 49 // If the section should be shown when empty at loading. If the section becomes
49 // empty because the user dismissed suggestions, the |emptyText| must be shown 50 // empty because the user dismissed suggestions, the |emptyText| must be shown
50 // in both cases. 51 // in both cases.
51 @property(nonatomic, assign) BOOL showIfEmpty; 52 @property(nonatomic, assign) BOOL showIfEmpty;
52 53
53 @end 54 @end
54 55
55 #endif // IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_IDENTIFIER_CONTENT_SUGGESTI ONS_SECTION_INFORMATION_H_ 56 #endif // IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_IDENTIFIER_CONTENT_SUGGESTI ONS_SECTION_INFORMATION_H_
OLDNEW
« no previous file with comments | « ios/chrome/browser/ui/content_suggestions/content_suggestions_view_controller.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698