| OLD | NEW |
| 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_SUGGESTIONS_SUGGESTIONS_FAVICON_ITEM_H_ | 5 #ifndef IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_FAVICON_IT
EM_H_ |
| 6 #define IOS_CHROME_BROWSER_UI_SUGGESTIONS_SUGGESTIONS_FAVICON_ITEM_H_ | 6 #define IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_FAVICON_IT
EM_H_ |
| 7 | 7 |
| 8 #import "ios/chrome/browser/ui/collection_view/cells/collection_view_item.h" | 8 #import "ios/chrome/browser/ui/collection_view/cells/collection_view_item.h" |
| 9 #import "ios/third_party/material_components_ios/src/components/CollectionCells/
src/MaterialCollectionCells.h" | 9 #import "ios/third_party/material_components_ios/src/components/CollectionCells/
src/MaterialCollectionCells.h" |
| 10 | 10 |
| 11 // Delegate for the SuggestionsFaviconCell, handling the interaction with the | 11 // Delegate for the ContentSuggestionsFaviconCell, handling the interaction with |
| 12 // inner collection view. | 12 // the inner collection view. |
| 13 @protocol SuggestionsFaviconCellDelegate | 13 @protocol ContentSuggestionsFaviconCellDelegate |
| 14 | 14 |
| 15 // Opens the favicon associated with the |indexPath| of the internal cell. | 15 // Opens the favicon associated with the |indexPath| of the internal cell. |
| 16 - (void)openFaviconAtIndexPath:(NSIndexPath*)innerIndexPath; | 16 - (void)openFaviconAtIndexPath:(NSIndexPath*)innerIndexPath; |
| 17 | 17 |
| 18 @end | 18 @end |
| 19 | 19 |
| 20 // Item for a cell containing favicons in the suggestions. The favicons are | 20 // Item for a cell containing favicons in the suggestions. The favicons are |
| 21 // presented in an inner collection view contained in the cell associated with | 21 // presented in an inner collection view contained in the cell associated with |
| 22 // this item. The collection view scrolls horizontally. | 22 // this item. The collection view scrolls horizontally. |
| 23 @interface SuggestionsFaviconItem : CollectionViewItem | 23 @interface ContentSuggestionsFaviconItem : CollectionViewItem |
| 24 | 24 |
| 25 @property(nonatomic, weak) id<SuggestionsFaviconCellDelegate> delegate; | 25 @property(nonatomic, weak) id<ContentSuggestionsFaviconCellDelegate> delegate; |
| 26 | 26 |
| 27 // Adds a favicon with a |favicon| image and a |title| to this item. | 27 // Adds a favicon with a |favicon| image and a |title| to this item. |
| 28 - (void)addFavicon:(UIImage*)favicon withTitle:(NSString*)title; | 28 - (void)addFavicon:(UIImage*)favicon withTitle:(NSString*)title; |
| 29 | 29 |
| 30 @end | 30 @end |
| 31 | 31 |
| 32 // The corresponding cell of a favicon item. | 32 // The corresponding cell of a favicon item. |
| 33 @interface SuggestionsFaviconCell : MDCCollectionViewCell | 33 @interface ContentSuggestionsFaviconCell : MDCCollectionViewCell |
| 34 | 34 |
| 35 // The inner collection view, used to display the favicons. | 35 // The inner collection view, used to display the favicons. |
| 36 @property(nonatomic, strong) UICollectionView* collectionView; | 36 @property(nonatomic, strong) UICollectionView* collectionView; |
| 37 | 37 |
| 38 @property(nonatomic, weak) id<SuggestionsFaviconCellDelegate> delegate; | 38 @property(nonatomic, weak) id<ContentSuggestionsFaviconCellDelegate> delegate; |
| 39 | 39 |
| 40 @end | 40 @end |
| 41 | 41 |
| 42 #endif // IOS_CHROME_BROWSER_UI_SUGGESTIONS_SUGGESTIONS_FAVICON_ITEM_H_ | 42 #endif // IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CONTENT_SUGGESTIONS_FAVICON
_ITEM_H_ |
| OLD | NEW |