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

Unified Diff: content/browser/tab_contents/tab_contents.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.h ('k') | content/renderer/render_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 26aa66a93671f607c4a759b0b4d211a622564f76..6e5fe75ed95db38ddd247f06f98b30d2ec7198d1 100644
--- a/content/browser/tab_contents/tab_contents.cc
+++ b/content/browser/tab_contents/tab_contents.cc
@@ -371,7 +371,9 @@ TabContents::~TabContents() {
}
void TabContents::AddObservers() {
- 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));
plugin_observer_.reset(new PluginObserver(this));
safebrowsing_detection_host_.reset(new safe_browsing::ClientSideDetectionHost(
this));
@@ -410,6 +412,7 @@ bool TabContents::OnMessageReceived(const IPC::Message& message) {
IPC_MESSAGE_HANDLER(ViewHostMsg_GoToEntryAtOffset, OnGoToEntryAtOffset)
IPC_MESSAGE_HANDLER(ViewHostMsg_PageContents, OnPageContents)
IPC_MESSAGE_HANDLER(ViewHostMsg_PageTranslated, OnPageTranslated)
+ IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateFaviconURL, OnUpdateFaviconURL)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP_EX()
@@ -1534,6 +1537,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) {
@@ -2405,6 +2411,14 @@ void TabContents::RequestDesktopNotificationPermission(
render_view_host()->routing_id(), callback_context, this);
}
+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::BeforeUnloadFiredFromRenderManager(
bool proceed,
bool* proceed_to_fire_unload) {
« no previous file with comments | « content/browser/tab_contents/tab_contents.h ('k') | content/renderer/render_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698