Commit e97d07a7 authored by Justin Cohen's avatar Justin Cohen Committed by Commit Bot

[ios] Add new most visited action icons.

Bug: 805635
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: I151911fab9a5e9e53531f52453b6c481fe901eaa
Reviewed-on: https://chromium-review.googlesource.com/934586Reviewed-by: default avatarRohit Rao <rohitrao@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#538837}
parent f8a3ec2f
...@@ -14,6 +14,11 @@ source_set("cells") { ...@@ -14,6 +14,11 @@ source_set("cells") {
] ]
deps = [ deps = [
":cells_ui", ":cells_ui",
"resources:ntp_bookmarks_icon",
"resources:ntp_history_icon",
"resources:ntp_most_visited_tile",
"resources:ntp_readinglist_icon",
"resources:ntp_recent_icon",
"//base", "//base",
"//components/ntp_tiles", "//components/ntp_tiles",
"//ios/chrome/app/strings", "//ios/chrome/app/strings",
......
...@@ -21,28 +21,30 @@ ...@@ -21,28 +21,30 @@
self = [super initWithType:0]; self = [super initWithType:0];
if (self) { if (self) {
_action = action; _action = action;
// TODO(crbug.com/805636) Theme below properly.
UIImage* defaultImage = [UIImage imageNamed:@"default_favicon"];
switch (_action) { switch (_action) {
case ContentSuggestionsMostVisitedActionBookmark: case ContentSuggestionsMostVisitedActionBookmark:
self.title = self.title =
l10n_util::GetNSString(IDS_IOS_CONTENT_SUGGESTIONS_BOOKMARKS); l10n_util::GetNSString(IDS_IOS_CONTENT_SUGGESTIONS_BOOKMARKS);
self.attributes = [FaviconAttributes attributesWithImage:defaultImage]; self.attributes = [FaviconAttributes
attributesWithImage:[UIImage imageNamed:@"ntp_bookmarks_icon"]];
break; break;
case ContentSuggestionsMostVisitedActionReadingList: case ContentSuggestionsMostVisitedActionReadingList:
self.title = self.title =
l10n_util::GetNSString(IDS_IOS_CONTENT_SUGGESTIONS_READING_LIST); l10n_util::GetNSString(IDS_IOS_CONTENT_SUGGESTIONS_READING_LIST);
self.attributes = [FaviconAttributes attributesWithImage:defaultImage]; self.attributes = [FaviconAttributes
attributesWithImage:[UIImage imageNamed:@"ntp_readinglist_icon"]];
break; break;
case ContentSuggestionsMostVisitedActionRecentTabs: case ContentSuggestionsMostVisitedActionRecentTabs:
self.title = self.title =
l10n_util::GetNSString(IDS_IOS_CONTENT_SUGGESTIONS_RECENT_TABS); l10n_util::GetNSString(IDS_IOS_CONTENT_SUGGESTIONS_RECENT_TABS);
self.attributes = [FaviconAttributes attributesWithImage:defaultImage]; self.attributes = [FaviconAttributes
attributesWithImage:[UIImage imageNamed:@"ntp_recent_icon"]];
break; break;
case ContentSuggestionsMostVisitedActionHistory: case ContentSuggestionsMostVisitedActionHistory:
self.title = self.title =
l10n_util::GetNSString(IDS_IOS_CONTENT_SUGGESTIONS_HISTORY); l10n_util::GetNSString(IDS_IOS_CONTENT_SUGGESTIONS_HISTORY);
self.attributes = [FaviconAttributes attributesWithImage:defaultImage]; self.attributes = [FaviconAttributes
attributesWithImage:[UIImage imageNamed:@"ntp_history_icon"]];
break; break;
} }
} }
......
# Copyright 2018 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.
import("//build/config/ios/asset_catalog.gni")
imageset("ntp_readinglist_icon") {
sources = [
"ntp_readinglist_icon.imageset/Contents.json",
"ntp_readinglist_icon.imageset/ntp_readinglist_icon.png",
"ntp_readinglist_icon.imageset/ntp_readinglist_icon@2x.png",
"ntp_readinglist_icon.imageset/ntp_readinglist_icon@3x.png",
]
}
imageset("ntp_most_visited_tile") {
sources = [
"ntp_most_visited_tile.imageset/Contents.json",
"ntp_most_visited_tile.imageset/ntp_most_visited_tile.png",
"ntp_most_visited_tile.imageset/ntp_most_visited_tile@2x.png",
"ntp_most_visited_tile.imageset/ntp_most_visited_tile@3x.png",
]
}
imageset("ntp_bookmarks_icon") {
sources = [
"ntp_bookmarks_icon.imageset/Contents.json",
"ntp_bookmarks_icon.imageset/ntp_bookmarks_icon.png",
"ntp_bookmarks_icon.imageset/ntp_bookmarks_icon@2x.png",
"ntp_bookmarks_icon.imageset/ntp_bookmarks_icon@3x.png",
]
}
imageset("ntp_recent_icon") {
sources = [
"ntp_recent_icon.imageset/Contents.json",
"ntp_recent_icon.imageset/ntp_recent_icon.png",
"ntp_recent_icon.imageset/ntp_recent_icon@2x.png",
"ntp_recent_icon.imageset/ntp_recent_icon@3x.png",
]
}
imageset("ntp_history_icon") {
sources = [
"ntp_history_icon.imageset/Contents.json",
"ntp_history_icon.imageset/ntp_history_icon.png",
"ntp_history_icon.imageset/ntp_history_icon@2x.png",
"ntp_history_icon.imageset/ntp_history_icon@3x.png",
]
}
{
"images": [
{
"idiom": "universal",
"scale": "1x",
"filename": "ntp_bookmarks_icon.png"
},
{
"idiom": "universal",
"scale": "2x",
"filename": "ntp_bookmarks_icon@2x.png"
},
{
"idiom": "universal",
"scale": "3x",
"filename": "ntp_bookmarks_icon@3x.png"
}
],
"info": {
"version": 1,
"author": "xcode"
}
}
{
"images": [
{
"idiom": "universal",
"scale": "1x",
"filename": "ntp_history_icon.png"
},
{
"idiom": "universal",
"scale": "2x",
"filename": "ntp_history_icon@2x.png"
},
{
"idiom": "universal",
"scale": "3x",
"filename": "ntp_history_icon@3x.png"
}
],
"info": {
"version": 1,
"author": "xcode"
}
}
{
"images": [
{
"idiom": "universal",
"scale": "1x",
"filename": "ntp_most_visited_tile.png"
},
{
"idiom": "universal",
"scale": "2x",
"filename": "ntp_most_visited_tile@2x.png"
},
{
"idiom": "universal",
"scale": "3x",
"filename": "ntp_most_visited_tile@3x.png"
}
],
"info": {
"version": 1,
"author": "xcode"
}
}
{
"images": [
{
"idiom": "universal",
"scale": "1x",
"filename": "ntp_readinglist_icon.png"
},
{
"idiom": "universal",
"scale": "2x",
"filename": "ntp_readinglist_icon@2x.png"
},
{
"idiom": "universal",
"scale": "3x",
"filename": "ntp_readinglist_icon@3x.png"
}
],
"info": {
"version": 1,
"author": "xcode"
}
}
{
"images": [
{
"idiom": "universal",
"scale": "1x",
"filename": "ntp_recent_icon.png"
},
{
"idiom": "universal",
"scale": "2x",
"filename": "ntp_recent_icon@2x.png"
},
{
"idiom": "universal",
"scale": "3x",
"filename": "ntp_recent_icon@3x.png"
}
],
"info": {
"version": 1,
"author": "xcode"
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment