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

Unified Diff: chrome/renderer/render_view.cc

Issue 1747015: Add support for new webkit capability allowing us to update (Closed)
Patch Set: Created 10 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
Index: chrome/renderer/render_view.cc
diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc
index 5b62f3286cc07b0cef81413654b3bbc9cfd2cc74..554b9b41ea154aa4a1249aff8617cf1198409384 100644
--- a/chrome/renderer/render_view.cc
+++ b/chrome/renderer/render_view.cc
@@ -1351,6 +1351,17 @@ void RenderView::UpdateTitle(WebFrame* frame, const string16& title) {
}
}
+// Tell the embedding application that the icon of the active page has changed
+void RenderView::UpdateIconURL(WebFrame* frame, const GURL& icon_url) {
brettw 2010/04/26 23:28:33 I would probably put this code in didChangeIcons a
+ // Ignore all but top level navigations...
+ if (!frame->parent()) {
+ Send(new ViewHostMsg_UpdateFavIconURL(
brettw 2010/04/26 23:28:33 I'd just put this on the same line if I was you, b
+ routing_id_,
+ page_id_,
+ icon_url));
+ }
+}
+
void RenderView::UpdateEncoding(WebFrame* frame,
const std::string& encoding_name) {
// Only update main frame's encoding_name.
@@ -2663,6 +2674,10 @@ void RenderView::didReceiveTitle(WebFrame* frame, const WebString& title) {
UpdateEncoding(frame, frame->view()->pageEncoding().utf8());
}
+void RenderView::didChangeIcons(WebFrame* frame) {
+ UpdateIconURL(frame, frame->favIconURL());
+}
+
void RenderView::didFinishDocumentLoad(WebFrame* frame) {
WebDataSource* ds = frame->dataSource();
NavigationState* navigation_state = NavigationState::FromDataSource(ds);

Powered by Google App Engine
This is Rietveld 408576698