summaryrefslogtreecommitdiffstats
path: root/src/core/web_contents_delegate_qt.cpp
diff options
context:
space:
mode:
authorPeter Varga <pvarga@inf.u-szeged.hu>2016-02-27 22:59:51 +0100
committerPeter Varga <pvarga@inf.u-szeged.hu>2016-03-11 06:21:36 +0000
commitf658dcb0893e7869cc0c029bfe0be82838af4bb8 (patch)
treecbb120c511ffb5ac2591cbd6d463e5e73083a847 /src/core/web_contents_delegate_qt.cpp
parenta35cf1f491b69e3aba4f9cd95dd37eff8c0a34b1 (diff)
Clean up FaviconManager and fix icon url in NavigationEntry
Change-Id: I56a109c9071ef581c6a51b5b7b8ce5a2464c6a76 Task-number: QTBUG-51179 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Diffstat (limited to 'src/core/web_contents_delegate_qt.cpp')
-rw-r--r--src/core/web_contents_delegate_qt.cpp20
1 files changed, 3 insertions, 17 deletions
diff --git a/src/core/web_contents_delegate_qt.cpp b/src/core/web_contents_delegate_qt.cpp
index a369f9550..51b9d5bd0 100644
--- a/src/core/web_contents_delegate_qt.cpp
+++ b/src/core/web_contents_delegate_qt.cpp
@@ -60,7 +60,6 @@
#include "components/web_cache/browser/web_cache_manager.h"
#include "content/browser/renderer_host/render_widget_host_impl.h"
-#include "content/public/browser/favicon_status.h"
#include "content/public/browser/invalidate_type.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/render_view_host.h"
@@ -241,16 +240,11 @@ void WebContentsDelegateQt::DidFinishLoad(content::RenderFrameHost* render_frame
if (render_frame_host->GetParent())
return;
+ if (!m_faviconManager->hasCandidate())
+ m_viewClient->iconChanged(QUrl());
+
m_viewClient->loadProgressChanged(100);
m_viewClient->loadFinished(true, toQt(validated_url));
-
- content::NavigationEntry *entry = web_contents()->GetController().GetVisibleEntry();
- if (!entry)
- return;
-
- // No available icon for the current entry
- if (!entry->GetFavicon().valid && !m_faviconManager->hasAvailableCandidateIcon())
- m_viewClient->iconChanged(QUrl());
}
void WebContentsDelegateQt::DidUpdateFaviconURL(const std::vector<content::FaviconURL> &candidates)
@@ -263,14 +257,6 @@ void WebContentsDelegateQt::DidUpdateFaviconURL(const std::vector<content::Favic
}
m_faviconManager->update(faviconCandidates);
-
- content::NavigationEntry *entry = web_contents()->GetController().GetVisibleEntry();
- if (entry) {
- FaviconInfo proposedFaviconInfo = m_faviconManager->getProposedFaviconInfo();
- content::FaviconStatus &favicon = entry->GetFavicon();
- favicon.url = toGurl(proposedFaviconInfo.url);
- favicon.valid = proposedFaviconInfo.isValid();
- }
}
content::ColorChooser *WebContentsDelegateQt::OpenColorChooser(content::WebContents *source, SkColor color, const std::vector<content::ColorSuggestion> &suggestion)