summaryrefslogtreecommitdiffstats
path: root/src/core/web_contents_adapter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/web_contents_adapter.cpp')
-rw-r--r--src/core/web_contents_adapter.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/core/web_contents_adapter.cpp b/src/core/web_contents_adapter.cpp
index 235534f18..3dcef4ba4 100644
--- a/src/core/web_contents_adapter.cpp
+++ b/src/core/web_contents_adapter.cpp
@@ -62,6 +62,7 @@
#include "content/public/browser/child_process_security_policy.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/render_view_host.h"
+#include "content/public/browser/favicon_status.h"
#include "content/public/common/page_state.h"
#include "content/public/common/page_zoom.h"
#include "content/public/common/renderer_preferences.h"
@@ -472,6 +473,17 @@ QUrl WebContentsAdapter::requestedUrl() const
return QUrl();
}
+QUrl WebContentsAdapter::iconUrl() const
+{
+ Q_D(const WebContentsAdapter);
+ if (content::NavigationEntry* entry = d->webContents->GetController().GetVisibleEntry()) {
+ content::FaviconStatus favicon = entry->GetFavicon();
+ if (favicon.valid)
+ return toQt(favicon.url);
+ }
+ return QUrl();
+}
+
QString WebContentsAdapter::pageTitle() const
{
Q_D(const WebContentsAdapter);