| Index: public/platform/WebNotificationManager.h
|
| diff --git a/public/web/WebSharedWorkerConnector.h b/public/platform/WebNotificationManager.h
|
| similarity index 62%
|
| copy from public/web/WebSharedWorkerConnector.h
|
| copy to public/platform/WebNotificationManager.h
|
| index 0371737102fe513cdb599591a28c1af074944b02..416b3018f8415e46e4e4208ce1ba919782b381b3 100644
|
| --- a/public/web/WebSharedWorkerConnector.h
|
| +++ b/public/platform/WebNotificationManager.h
|
| @@ -28,32 +28,34 @@
|
| * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| */
|
|
|
| -#ifndef WebSharedWorkerConnector_h
|
| -#define WebSharedWorkerConnector_h
|
| +#ifndef WebNotificationManager_h
|
| +#define WebNotificationManager_h
|
|
|
| -#include "WebContentSecurityPolicy.h"
|
| +#include "WebNotificationPermission.h"
|
|
|
| namespace blink {
|
|
|
| -class WebString;
|
| -class WebMessagePortChannel;
|
| -class WebURL;
|
| +struct WebNotificationData;
|
| +class WebNotificationDelegate;
|
| +class WebSerializedOrigin;
|
|
|
| -// This is the interface to conncect to SharedWorker.
|
| -// Since SharedWorkers communicate entirely through MessagePorts this interface only contains APIs for starting up a SharedWorker.
|
| -class WebSharedWorkerConnector {
|
| +// Provides the services to show platform notifications to the user.
|
| +class WebNotificationManager {
|
| public:
|
| - virtual ~WebSharedWorkerConnector() { }
|
| + virtual ~WebNotificationManager() { }
|
|
|
| - class ConnectListener {
|
| - public:
|
| - // Invoked once the connect event has been sent so the caller can free this object.
|
| - virtual void connected() = 0;
|
| - virtual void scriptLoadFailed() = 0;
|
| - };
|
| + // Shows a notification on the user's system.
|
| + virtual bool show(const blink::WebSerializedOrigin&, const WebNotificationData&, WebNotificationDelegate*) = 0;
|
|
|
| - // Sends a connect event to the SharedWorker context. The listener is invoked when this async operation completes.
|
| - virtual void connect(WebMessagePortChannel*, ConnectListener*) = 0;
|
| + // Closes a notification previously shown, and removes it if being shown.
|
| + virtual void close(WebNotificationDelegate*) = 0;
|
| +
|
| + // Indicates that the delegate object is being destroyed, and must no longer
|
| + // be used by the embedder to dispatch events.
|
| + virtual void notifyDelegateDestroyed(WebNotificationDelegate*) = 0;
|
| +
|
| + // Checks the permission level for the given origin.
|
| + virtual WebNotificationPermission checkPermission(const WebSerializedOrigin&) = 0;
|
| };
|
|
|
| } // namespace blink
|
|
|