| 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..780f826c54b4e3442b091a4fbfcea9c7265e64d4
|
| --- /dev/null
|
| +++ b/ios/chrome/browser/ui/suggestions/suggestions_data_source.h
|
| @@ -0,0 +1,32 @@
|
| +// 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>
|
| +
|
| +#import "ios/chrome/browser/ui/suggestions/suggestions_view_controller.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
|
| +// CollectionViewController is set.
|
| +@interface SuggestionsDataSource : NSObject<SuggestionsDataSource>
|
| +
|
| +// The CollectionViewController for this Data Source. Setting this
|
| +// CollectionViewController will add the currents items in the DataSource to the
|
| +// CollectionViewController.
|
| +@property(nonatomic, strong) CollectionViewController* collectionViewController;
|
| +
|
| +// 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
|
| +// section at the end.
|
| +- (void)addTextItem:(NSString*)title
|
| + subtitle:(NSString*)subtitle
|
| + toSection:(NSUInteger)section;
|
| +@end
|
| +
|
| +#endif // IOS_CHROME_BROWSER_UI_SUGGESTIONS_SUGGESTIONS_DATA_SOURCE_H_
|
|
|