diff options
author | Andras Becsi <andras.becsi@digia.com> | 2013-06-25 18:15:53 +0200 |
---|---|---|
committer | Zeno Albisser <zeno.albisser@digia.com> | 2013-06-25 18:38:59 +0200 |
commit | 211f7b2b56db66f7ec2979404d3a51419f9019c0 (patch) | |
tree | 02d78b44ad048f36b886ad024d94da0f3efa7767 /lib/web_contents_delegate_qt.cpp | |
parent | e3de43ff09c06d478b7be46706deae737894dd83 (diff) |
Use WebContentsViewQt::SetPageTitle for title change notifications
Using the NotificationObserver mechanism for this purpose
seams to be a bit of overkill so remove the inheritance from
WebContentsDelegateQt. We can re-add it later if we find useful
notifications.
Change-Id: I4dff59f66893cd36ed8c0700fa492a3eeb99f87b
Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
Diffstat (limited to 'lib/web_contents_delegate_qt.cpp')
-rw-r--r-- | lib/web_contents_delegate_qt.cpp | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/lib/web_contents_delegate_qt.cpp b/lib/web_contents_delegate_qt.cpp index 222d6f1bc..22725bdc7 100644 --- a/lib/web_contents_delegate_qt.cpp +++ b/lib/web_contents_delegate_qt.cpp @@ -77,20 +77,6 @@ WebContentsDelegateQt::WebContentsDelegateQt(content::BrowserContext* browser_co m_webContents->GetRenderViewHost()->SyncRendererPrefs(); m_webContents->SetDelegate(this); - m_registrar.Add(this, content::NOTIFICATION_WEB_CONTENTS_TITLE_UPDATED, content::Source<content::WebContents>(m_webContents.get())); -} - -void WebContentsDelegateQt::Observe(int type, const content::NotificationSource& source, const content::NotificationDetails& details) -{ - if (type == content::NOTIFICATION_WEB_CONTENTS_TITLE_UPDATED) { - std::pair<content::NavigationEntry*, bool>* title = content::Details<std::pair<content::NavigationEntry*, bool> >(details).ptr(); - - if (title->first) { - string16 text = title->first->GetTitle(); - QString title = QString::fromUtf16(text.data()); - Q_EMIT titleChanged(title); - } - } } void WebContentsDelegateQt::NavigationStateChanged(const content::WebContents* source, unsigned changed_flags) |