Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(210)

Unified Diff: public/platform/WebNotificationManager.h

Issue 584023002: [WIP] Implement Notifications through Platform instead of WebFrame. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « public/platform/WebNotificationDelegate.h ('k') | public/web/WebFrameClient.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « public/platform/WebNotificationDelegate.h ('k') | public/web/WebFrameClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698