diff options
author | Zeno Albisser <zeno.albisser@digia.com> | 2013-06-18 14:53:33 +0200 |
---|---|---|
committer | Zeno Albisser <zeno.albisser@digia.com> | 2013-06-18 15:50:51 +0200 |
commit | 4e9e513e3415ebb07da2d6360d770288765c3d54 (patch) | |
tree | 3fac2a68321979a60199206233330a7164d05d53 /lib/web_contents_delegate_qt.cpp | |
parent | 398159d941942886b40105680820f497e5ca90a5 (diff) |
Add initial API layer for widgets.
Diffstat (limited to 'lib/web_contents_delegate_qt.cpp')
-rw-r--r-- | lib/web_contents_delegate_qt.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/web_contents_delegate_qt.cpp b/lib/web_contents_delegate_qt.cpp index d4aad13a0..cc0f53679 100644 --- a/lib/web_contents_delegate_qt.cpp +++ b/lib/web_contents_delegate_qt.cpp @@ -53,6 +53,7 @@ #include <QGuiApplication> #include <QStyleHints> +#include <QUrl> static const int kTestWindowWidth = 800; static const int kTestWindowHeight = 600; @@ -95,8 +96,11 @@ void WebContentsDelegateQt::Observe(int type, const content::NotificationSource& void WebContentsDelegateQt::NavigationStateChanged(const content::WebContents* source, unsigned changed_flags) { - if (changed_flags & content::INVALIDATE_TYPE_URL) - Q_EMIT urlChanged(); + if (changed_flags & content::INVALIDATE_TYPE_URL) { + GURL gurl = web_contents()->GetActiveURL(); + QUrl url(QString::fromStdString(gurl.spec())); + Q_EMIT urlChanged(url); + } } void WebContentsDelegateQt::LoadingStateChanged(content::WebContents* source) |