diff options
| author | Simon Hausmann <simon.hausmann@digia.com> | 2012-11-23 15:08:59 +0100 |
|---|---|---|
| committer | Simon Hausmann <simon.hausmann@digia.com> | 2012-11-23 15:09:20 +0100 |
| commit | 061d58bc0fa016cfeed744fd3e4663460635d69b (patch) | |
| tree | ad9b8b032c803e1c9054c23fa1b7a0f1976bf98f /Source/WebKit/blackberry/Api/WebPage.cpp | |
| parent | 470286ecfe79d59df14944e5b5d34630fc739391 (diff) | |
| download | qtwebkit-061d58bc0fa016cfeed744fd3e4663460635d69b.tar.gz | |
Imported WebKit commit 8eb048315f36fa33731f28694630fe4a3c2cbc99 (http://svn.webkit.org/repository/webkit/trunk@135602)
New snapshot that fixes various bugs
Change-Id: Icb6ce541a26a9f500d087821ce4b83a8d8a5474a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'Source/WebKit/blackberry/Api/WebPage.cpp')
| -rw-r--r-- | Source/WebKit/blackberry/Api/WebPage.cpp | 63 |
1 files changed, 51 insertions, 12 deletions
diff --git a/Source/WebKit/blackberry/Api/WebPage.cpp b/Source/WebKit/blackberry/Api/WebPage.cpp index bd372b961..aece95429 100644 --- a/Source/WebKit/blackberry/Api/WebPage.cpp +++ b/Source/WebKit/blackberry/Api/WebPage.cpp @@ -93,7 +93,7 @@ #include "NavigatorContentUtilsClientBlackBerry.h" #endif #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS) -#include "NotificationPresenterImpl.h" +#include "NotificationClientBlackBerry.h" #endif #include "Page.h" #include "PageCache.h" @@ -429,6 +429,9 @@ WebPagePrivate::WebPagePrivate(WebPage* webPage, WebPageClient* client, const In , m_autofillManager(AutofillManager::create(this)) , m_documentStyleRecalcPostponed(false) , m_documentChildNeedsStyleRecalc(false) +#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS) + , m_notificationManager(this) +#endif { static bool isInitialized = false; if (!isInitialized) { @@ -561,7 +564,7 @@ void WebPagePrivate::init(const BlackBerry::Platform::String& pageGroupName) #endif #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS) - WebCore::provideNotification(m_page, NotificationPresenterImpl::instance()); + WebCore::provideNotification(m_page, new NotificationClientBlackBerry(this)); #endif #if ENABLE(NAVIGATOR_CONTENT_UTILS) @@ -5887,16 +5890,6 @@ BlackBerry::Platform::String WebPage::textHasAttribute(const BlackBerry::Platfor return ""; } -void WebPage::setAllowNotification(const BlackBerry::Platform::String& domain, bool allow) -{ -#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS) - static_cast<NotificationPresenterImpl*>(NotificationPresenterImpl::instance())->onPermission(domain.c_str(), allow); -#else - UNUSED_PARAM(domain); - UNUSED_PARAM(allow); -#endif -} - void WebPage::setJavaScriptCanAccessClipboard(bool enabled) { d->m_page->settings()->setJavaScriptCanAccessClipboard(enabled); @@ -6160,5 +6153,51 @@ void WebPagePrivate::didComposite() InspectorInstrumentation::didComposite(m_page); } +void WebPage::updateNotificationPermission(const BlackBerry::Platform::String& requestId, bool allowed) +{ +#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS) + d->notificationManager().updatePermission(requestId, allowed); +#else + UNUSED_PARAM(requestId); + UNUSED_PARAM(allowed); +#endif +} + +void WebPage::notificationClicked(const BlackBerry::Platform::String& notificationId) +{ +#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS) + d->notificationManager().notificationClicked(notificationId); +#else + UNUSED_PARAM(notificationId); +#endif +} + +void WebPage::notificationClosed(const BlackBerry::Platform::String& notificationId) +{ +#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS) + d->notificationManager().notificationClosed(notificationId); +#else + UNUSED_PARAM(notificationId); +#endif +} + +void WebPage::notificationError(const BlackBerry::Platform::String& notificationId) +{ +#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS) + d->notificationManager().notificationError(notificationId); +#else + UNUSED_PARAM(notificationId); +#endif +} + +void WebPage::notificationShown(const BlackBerry::Platform::String& notificationId) +{ +#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS) + d->notificationManager().notificationShown(notificationId); +#else + UNUSED_PARAM(notificationId); +#endif +} + } } |
