Commit 1c781715 authored by eric@webkit.org's avatar eric@webkit.org
Browse files

2010-04-02 Rafael Weinstein <rafaelw@chromium.org>

        Reviewed by Adam Barth.

        Clean up unused calls after changes to checkPermission and requestPermission argument lists.

        * public/WebNotificationPresenter.h:
        * src/NotificationPresenterImpl.cpp:
        (WebKit::NotificationPresenterImpl::checkPermission):
        (WebKit::NotificationPresenterImpl::requestPermission):
2010-04-02  Rafael Weinstein  <rafaelw@chromium.org>

        Reviewed by Adam Barth.

        Clean up unused calls after changes to checkPermission and requestPermission argument lists.

        * WebCoreSupport/WebDesktopNotificationsDelegate.cpp:
        (WebDesktopNotificationsDelegate::requestPermission):
        * WebCoreSupport/WebDesktopNotificationsDelegate.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@57026 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent dfe84470
2010-04-02 Rafael Weinstein <rafaelw@chromium.org>
Reviewed by Adam Barth.
Clean up unused calls after changes to checkPermission and requestPermission argument lists.
* public/WebNotificationPresenter.h:
* src/NotificationPresenterImpl.cpp:
(WebKit::NotificationPresenterImpl::checkPermission):
(WebKit::NotificationPresenterImpl::requestPermission):
2010-04-02 Zhenyao Mo <zmo@google.com>
Reviewed by Eric Seidel.
......
......@@ -61,34 +61,12 @@ public:
virtual void objectDestroyed(const WebNotification&) = 0;
// Checks the permission level for the given origin.
// FIXME: This should become abstract when the below is removed.
virtual Permission checkPermission(const WebURL& url)
{
return PermissionNotAllowed;
};
// Checks the permission level for the given URL. If the URL is being displayed in a document
// (as opposed to a worker or other ScriptExecutionContext), |document| will also be provided.
// FIXME: This method should be removed as clients don't need WebDocument anymore.
virtual Permission checkPermission(const WebURL& url, WebDocument* document)
{
return PermissionNotAllowed;
}
virtual Permission checkPermission(const WebURL&) = 0;
// Requests permission for a given origin. This operation is asynchronous and the callback provided
// will be invoked when the permission decision is made. Callback pointer must remain
// valid until called.
// FIXME: This method should be removed when clients are moved to the below.
virtual void requestPermission(const WebString& origin, WebNotificationPermissionCallback* callback)
{
callback->permissionRequestComplete();
}
// FIXME: This method should be abstract when the above is removed.
virtual void requestPermission(const WebSecurityOrigin& origin, WebNotificationPermissionCallback* callback)
{
callback->permissionRequestComplete();
}
virtual void requestPermission(const WebSecurityOrigin&, WebNotificationPermissionCallback*) = 0;
};
} // namespace WebKit
......
......@@ -94,18 +94,11 @@ void NotificationPresenterImpl::notificationObjectDestroyed(Notification* notifi
NotificationPresenter::Permission NotificationPresenterImpl::checkPermission(const KURL& sourceURL)
{
int result = m_presenter->checkPermission(sourceURL);
// FIXME: Remove this once clients are updated to use the above signature.
if (result == NotificationPresenter::PermissionNotAllowed)
result = m_presenter->checkPermission(sourceURL, 0);
return static_cast<NotificationPresenter::Permission>(result);
}
void NotificationPresenterImpl::requestPermission(SecurityOrigin* origin, PassRefPtr<VoidCallback> callback)
{
// FIXME: Remove the first call once clients are updated to use the second signature.
m_presenter->requestPermission(origin->toString(), new VoidCallbackClient(callback));
m_presenter->requestPermission(WebSecurityOrigin(origin), new VoidCallbackClient(callback));
}
......
2010-04-02 Rafael Weinstein <rafaelw@chromium.org>
Reviewed by Adam Barth.
Clean up unused calls after changes to checkPermission and requestPermission argument lists.
* WebCoreSupport/WebDesktopNotificationsDelegate.cpp:
(WebDesktopNotificationsDelegate::requestPermission):
* WebCoreSupport/WebDesktopNotificationsDelegate.h:
2010-04-01 Chris Marrin <cmarrin@apple.com>
Reviewed by Simon Fraser.
......
......@@ -172,11 +172,6 @@ void WebDesktopNotificationsDelegate::requestPermission(SecurityOrigin* origin,
notificationDelegate()->requestNotificationPermission(org);
}
NotificationPresenter::Permission WebDesktopNotificationsDelegate::checkPermission(const KURL& url, Document*)
{
return NotificationPresenter::PermissionNotAllowed;
}
NotificationPresenter::Permission WebDesktopNotificationsDelegate::checkPermission(const KURL& url)
{
int out = 0;
......
......@@ -50,7 +50,6 @@ public:
virtual void cancel(WebCore::Notification* object);
virtual void notificationObjectDestroyed(WebCore::Notification* object);
virtual void requestPermission(WebCore::SecurityOrigin* origin, PassRefPtr<WebCore::VoidCallback> callback);
virtual WebCore::NotificationPresenter::Permission checkPermission(const KURL& url, Document* document);
virtual WebCore::NotificationPresenter::Permission checkPermission(const KURL& url);
private:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment