Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_DATA_SOURC E_H_ | |
| 6 #define IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_DATA_SOURC E_H_ | |
| 7 | |
| 8 @protocol ContentSuggestionsData; | |
| 9 @protocol ContentSuggestionsDataSink; | |
| 10 | |
| 11 // DataSource for the content suggestions. Provides the suggestions data in a | |
| 12 // format compatible with objective-c. | |
|
lpromero
2017/01/26 10:10:20
Nit: Objective-C
gambard
2017/01/30 15:19:17
Done.
| |
| 13 @protocol ContentSuggestionsDataSource | |
| 14 | |
| 15 // The data sink that will be notified when the data change. | |
| 16 @property(nonatomic, weak) id<ContentSuggestionsDataSink> dataSink; | |
|
lpromero
2017/01/26 10:10:20
It's basically a dataSource delegate?
marq (ping after 24h)
2017/01/27 12:44:55
The 'dataSink' naming is something I proposed a wh
| |
| 17 | |
| 18 // Returns all the data currently available. | |
|
marq (ping after 24h)
2017/01/27 12:44:55
What is returned if no data is available? (I would
gambard
2017/01/30 15:19:17
Done.
| |
| 19 - (NSArray<id<ContentSuggestionsData>>*)getData; | |
|
lpromero
2017/01/26 10:10:20
s/getData/currentData
marq (ping after 24h)
2017/01/27 12:44:55
Except the important noun is 'suggestions', not 'd
gambard
2017/01/30 15:19:17
Done.
| |
| 20 | |
| 21 // Returns the new data. | |
|
lpromero
2017/01/26 10:10:20
When dataSink receives the dataAvailable message,
marq (ping after 24h)
2017/01/27 12:44:55
Definitey consider this approach.
Also I would pr
gambard
2017/01/30 15:19:17
I will remove this method for now as I am not sure
| |
| 22 - (NSArray<id<ContentSuggestionsData>>*)getMoreData; | |
|
marq (ping after 24h)
2017/01/27 12:44:55
Document what is returned when there is no further
gambard
2017/01/30 15:19:17
Done.
| |
| 23 | |
| 24 @end | |
| 25 | |
| 26 #endif // IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_DATA_SO URCE_H_ | |
| OLD | NEW |