Chromium Code Reviews| Index: ios/chrome/browser/ui/content_suggestions/content_suggestions_view_controller.mm |
| diff --git a/ios/chrome/browser/ui/content_suggestions/content_suggestions_view_controller.mm b/ios/chrome/browser/ui/content_suggestions/content_suggestions_view_controller.mm |
| index e6690984f477a22d36d1abe8dbc890babd6a41fc..1863075eb533f2d29c60e658e20ac9610cab71e2 100644 |
| --- a/ios/chrome/browser/ui/content_suggestions/content_suggestions_view_controller.mm |
| +++ b/ios/chrome/browser/ui/content_suggestions/content_suggestions_view_controller.mm |
| @@ -141,10 +141,13 @@ using CSCollectionViewItem = CollectionViewItem<SuggestedContent>; |
| switch ([self.collectionUpdater contentSuggestionTypeForItem:item]) { |
| case ContentSuggestionTypeReadingList: |
| case ContentSuggestionTypeArticle: |
| + [self blurOmnibox]; |
| [self.suggestionCommandHandler openPageForItem:item]; |
| break; |
| case ContentSuggestionTypeMostVisited: |
| - // TODO(crbug.com/707754): Open the most visited site. |
| + [self blurOmnibox]; |
| + [self.suggestionCommandHandler openMostVisitedItem:item |
| + atIndex:indexPath.item]; |
| break; |
| case ContentSuggestionTypeEmpty: |
| break; |
| @@ -271,4 +274,10 @@ using CSCollectionViewItem = CollectionViewItem<SuggestedContent>; |
| [self.collectionView insertItemsAtIndexPaths:@[ emptyItem ]]; |
| } |
| +// Tells WebToolbarController to resign focus to the omnibox. |
| +- (void)blurOmnibox { |
|
marq (ping after 24h)
2017/06/02 08:25:47
Minor naming nit: when 'focus' is used to mean 'ma
gambard
2017/06/02 13:26:58
I had the same reaction as you :)
But as defocus w
|
| + // TODO(crbug.com/700375): once the omnibox is part of Content Suggestions, |
| + // remove the fake omnibox focus here. |
| +} |
| + |
| @end |