Chromium Code Reviews| 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); |