Chromium Code Reviews| Index: ios/chrome/browser/ui/suggestions/suggestions_data_source.h |
| diff --git a/ios/chrome/browser/ui/suggestions/suggestions_data_source.h b/ios/chrome/browser/ui/suggestions/suggestions_data_source.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..5a072957832e3634973bc1fe38c97fe44b9a3f8e |
| --- /dev/null |
| +++ b/ios/chrome/browser/ui/suggestions/suggestions_data_source.h |
| @@ -0,0 +1,30 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// 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_SUGGESTIONS_SUGGESTIONS_DATA_SOURCE_H_ |
| +#define IOS_CHROME_BROWSER_UI_SUGGESTIONS_SUGGESTIONS_DATA_SOURCE_H_ |
| + |
| +#import <UIKit/UIKit.h> |
| + |
| +@class CollectionViewController; |
| + |
| +// Data Source for a CollectionViewController populating it with some items and |
| +// handling the items addition and removal. The items can be added before the |
|
lpromero
2017/01/11 09:47:04
Is removal in one of the follow up CLs?
gambard
2017/01/11 15:10:37
Not yet. I will remove it for now.
|
| +// CollectionViewController is set. |
|
lpromero
2017/01/11 09:47:04
Is this really useful? It adds a lot of complexity
gambard
2017/01/11 15:10:37
Done.
|
| +@interface SuggestionsDataSource : NSObject |
|
marq (ping after 24h)
2017/01/11 13:43:09
The name 'DataSource" here is confusing, since tha
gambard
2017/01/11 15:10:37
I have changed the architecture.
|
| + |
| +// The CollectionViewController for this Data Source. Setting this |
| +// CollectionViewController will add the currents items in the DataSource to the |
|
lpromero
2017/01/11 09:47:04
s/currents/current?
gambard
2017/01/11 15:10:37
Done.
|
| +// CollectionViewController. |
| +@property(nonatomic, strong) CollectionViewController* collectionViewController; |
|
marq (ping after 24h)
2017/01/11 13:43:09
I don't think this object should be owning the vie
|
| + |
| +// Adds a text item with a |title| and a |subtitle| in the section numbered |
| +// |section|. If |section| > the current number of section, it will add a new |
|
lpromero
2017/01/11 09:47:04
Avoid ">", make full text sentences.
gambard
2017/01/11 15:10:37
Done.
|
| +// section at the end. |
|
lpromero
2017/01/11 09:47:04
In the impl, passing a section more than "count" w
gambard
2017/01/11 15:10:37
It should not. With the current implementation it
|
| +- (void)addTextItem:(NSString*)title |
| + subtitle:(NSString*)subtitle |
| + toSection:(NSUInteger)section; |
|
lpromero
2017/01/11 09:47:04
Add new line.
gambard
2017/01/11 15:10:37
Done.
|
| +@end |
| + |
| +#endif // IOS_CHROME_BROWSER_UI_SUGGESTIONS_SUGGESTIONS_DATA_SOURCE_H_ |