OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef IOS_CHROME_BROWSER_UI_SUGGESTIONS_SUGGESTIONS_DATA_SOURCE_H_ |
| 6 #define IOS_CHROME_BROWSER_UI_SUGGESTIONS_SUGGESTIONS_DATA_SOURCE_H_ |
| 7 |
| 8 #import <UIKit/UIKit.h> |
| 9 |
| 10 #import "ios/chrome/browser/ui/suggestions/suggestions_view_controller.h" |
| 11 |
| 12 @class CollectionViewController; |
| 13 |
| 14 // Data Source for a CollectionViewController populating it with some items and |
| 15 // handling the items addition and removal. The items can be added before the |
| 16 // CollectionViewController is set. |
| 17 @interface SuggestionsDataSource : NSObject<SuggestionsDataSource> |
| 18 |
| 19 // The CollectionViewController for this Data Source. Setting this |
| 20 // CollectionViewController will add the currents items in the DataSource to the |
| 21 // CollectionViewController. |
| 22 @property(nonatomic, strong) CollectionViewController* collectionViewController; |
| 23 |
| 24 // Adds a text item with a |title| and a |subtitle| in the section numbered |
| 25 // |section|. If |section| > the current number of section, it will add a new |
| 26 // section at the end. |
| 27 - (void)addTextItem:(NSString*)title |
| 28 subtitle:(NSString*)subtitle |
| 29 toSection:(NSUInteger)section; |
| 30 @end |
| 31 |
| 32 #endif // IOS_CHROME_BROWSER_UI_SUGGESTIONS_SUGGESTIONS_DATA_SOURCE_H_ |
OLD | NEW |