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

Unified Diff: content/renderer/render_view.cc

Issue 6672065: Support touch icon in FaviconHelper (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compile error for clank mac and unit test memory leak Created 9 years, 8 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
« no previous file with comments | « content/browser/tab_contents/tab_contents.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_view.cc
diff --git a/content/renderer/render_view.cc b/content/renderer/render_view.cc
index 60520634cbaeb9f5397de9975207f6a593abcd72..0655bd6a888acfaf3ba58e0e193f12c1560f1e18 100644
--- a/content/renderer/render_view.cc
+++ b/content/renderer/render_view.cc
@@ -2010,9 +2010,14 @@ void RenderView::didStopLoading() {
// displayed when done loading. Ideally we would send notification when
// finished parsing the head, but webkit doesn't support that yet.
// The feed discovery code would also benefit from access to the head.
+
+ // TODO : Get both favicon and touch icon url, and send them to the browser.
GURL favicon_url(webview()->mainFrame()->favIconURL());
- if (!favicon_url.is_empty())
- Send(new ViewHostMsg_UpdateFaviconURL(routing_id_, page_id_, favicon_url));
+ if (!favicon_url.is_empty()) {
+ std::vector<FaviconURL> urls;
+ urls.push_back(FaviconURL(favicon_url, FAVICON));
+ Send(new ViewHostMsg_UpdateFaviconURL(routing_id_, page_id_, urls));
+ }
AddGURLSearchProvider(webview()->mainFrame()->openSearchDescriptionURL(),
search_provider::AUTODETECTED_PROVIDER);
@@ -3147,10 +3152,9 @@ void RenderView::didReceiveTitle(WebFrame* frame, const WebString& title) {
void RenderView::didChangeIcons(WebFrame* frame) {
if (!frame->parent()) {
- Send(new ViewHostMsg_UpdateFaviconURL(
- routing_id_,
- page_id_,
- frame->favIconURL()));
+ std::vector<FaviconURL> urls;
+ urls.push_back(FaviconURL(frame->favIconURL(), FAVICON));
+ Send(new ViewHostMsg_UpdateFaviconURL(routing_id_, page_id_, urls));
}
}
« no previous file with comments | « content/browser/tab_contents/tab_contents.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698