| Index: content/browser/tab_contents/tab_contents.cc
|
| diff --git a/content/browser/tab_contents/tab_contents.cc b/content/browser/tab_contents/tab_contents.cc
|
| index be64ae1013117b21ab7025607fe7c0cf59c0337d..084f9e93fd836510374f02e01d7d4b962e6cd0f3 100644
|
| --- a/content/browser/tab_contents/tab_contents.cc
|
| +++ b/content/browser/tab_contents/tab_contents.cc
|
| @@ -93,6 +93,7 @@
|
| #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
|
| #include "ui/base/resource/resource_bundle.h"
|
| #include "ui/gfx/codec/png_codec.h"
|
| +#include "ui/gfx/favicon_size.h"
|
| #include "webkit/glue/password_form.h"
|
| #include "webkit/glue/webpreferences.h"
|
|
|
| @@ -389,7 +390,12 @@ TabContents::~TabContents() {
|
| void TabContents::AddObservers() {
|
| printing_.reset(new printing::PrintViewManager(this));
|
| print_preview_.reset(new printing::PrintPreviewMessageHandler(this));
|
| - favicon_helper_.reset(new FaviconHelper(this));
|
| + favicon_helper_.reset(new FaviconHelper(this, FaviconHelper::FAVICON));
|
| +
|
| + if (browser_defaults::kEnableTouchIcon) {
|
| + touch_icon_helper_.reset(new FaviconHelper(this, FaviconHelper::TOUCH));
|
| + }
|
| +
|
| autofill_manager_.reset(new AutofillManager(this));
|
| autocomplete_history_manager_.reset(new AutocompleteHistoryManager(this));
|
| desktop_notification_handler_.reset(
|
| @@ -439,6 +445,7 @@ bool TabContents::OnMessageReceived(const IPC::Message& message) {
|
| IPC_MESSAGE_HANDLER(ViewHostMsg_SetSuggestions, OnSetSuggestions)
|
| IPC_MESSAGE_HANDLER(ViewHostMsg_InstantSupportDetermined,
|
| OnInstantSupportDetermined)
|
| + IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateFaviconURL, OnUpdateFaviconURL)
|
| IPC_MESSAGE_UNHANDLED(handled = false)
|
| IPC_END_MESSAGE_MAP_EX()
|
|
|
| @@ -1670,6 +1677,9 @@ void TabContents::DidNavigateMainFramePostCommit(
|
| // Get the favicon, either from history or request it from the net.
|
| favicon_helper_->FetchFavicon(details.entry->url());
|
|
|
| + if (touch_icon_helper_.get())
|
| + touch_icon_helper_->FetchFavicon(details.entry->url());
|
| +
|
| // Clear all page actions, blocked content notifications and browser actions
|
| // for this tab, unless this is an in-page navigation.
|
| if (!details.is_in_page) {
|
| @@ -1976,6 +1986,14 @@ void TabContents::OnInstantSupportDetermined(int32 page_id, bool result) {
|
| delegate()->OnInstantSupportDetermined(page_id, result);
|
| }
|
|
|
| +void TabContents::OnUpdateFaviconURL(
|
| + int32 page_id,
|
| + const std::vector<FaviconURL>& candidates) {
|
| + favicon_helper().OnUpdateFaviconURL(page_id, candidates);
|
| + if (touch_icon_helper_.get())
|
| + touch_icon_helper_->OnUpdateFaviconURL(page_id, candidates);
|
| +}
|
| +
|
| void TabContents::OnContentSettingsAccessed(bool content_was_blocked) {
|
| if (delegate_)
|
| delegate_->OnContentSettingsChange(this);
|
|
|