Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(382)

Unified Diff: content/renderer/render_view_impl.cc

Issue 1010783002: [Icons NTP] Working prototype to fetch, store, and display big icons. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/renderer/render_view_impl.cc
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index 81fd8b44618edfe66a40b2697b987fe951e3eaea..935b5163c5f2950de5bbb43bb636ccb44618bb63 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -451,15 +451,6 @@ class WebWidgetLockTarget : public MouseLockDispatcher::LockTarget {
blink::WebWidget* webwidget_;
};
-bool TouchEnabled() {
-// Based on the definition of chrome::kEnableTouchIcon.
-#if defined(OS_ANDROID)
- return true;
-#else
- return false;
-#endif
-}
-
WebDragData DropDataToWebDragData(const DropData& drop_data) {
std::vector<WebDragData::Item> item_list;
@@ -2290,9 +2281,6 @@ void RenderViewImpl::didChangeIcon(WebLocalFrame* frame,
if (frame->parent())
return;
- if (!TouchEnabled() && icon_type != WebIconURL::TypeFavicon)
- return;
-
WebVector<WebIconURL> icon_urls = frame->iconURLs(icon_type);
std::vector<FaviconURL> urls;
for (size_t i = 0; i < icon_urls.size(); i++) {
@@ -3998,9 +3986,8 @@ void RenderViewImpl::SendUpdateFaviconURL(const std::vector<FaviconURL>& urls) {
}
void RenderViewImpl::DidStopLoadingIcons() {
- int icon_types = WebIconURL::TypeFavicon;
- if (TouchEnabled())
- icon_types |= WebIconURL::TypeTouchPrecomposed | WebIconURL::TypeTouch;
+ int icon_types = WebIconURL::TypeFavicon | WebIconURL::TypeTouchPrecomposed |
+ WebIconURL::TypeTouch;
// Favicons matter only for the top-level frame. If it is a WebRemoteFrame,
// just return early.
« chrome/common/favicon/big_icon_url_parser.h ('K') | « content/child/runtime_features.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698