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

Unified Diff: content/common/platform_notification_messages.h

Issue 381633005: Refactor Web Notification permission requests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 5 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
Index: content/common/platform_notification_messages.h
diff --git a/content/common/platform_notification_messages.h b/content/common/platform_notification_messages.h
new file mode 100644
index 0000000000000000000000000000000000000000..0745b88e4dd14a54ee88aff3f73df81f878063f2
--- /dev/null
+++ b/content/common/platform_notification_messages.h
@@ -0,0 +1,30 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Messages for platform-native notifications using the Web Notification API.
+// Multiply-included message file, hence no include guard.
+
+#include "ipc/ipc_message_macros.h"
+#include "third_party/WebKit/public/platform/WebNotificationPermission.h"
+#include "url/gurl.h"
+
+#define IPC_MESSAGE_START PlatformNotificationMsgStart
+
+IPC_ENUM_TRAITS_MAX_VALUE(blink::WebNotificationPermission,
+ blink::WebNotificationPermissionLast)
+
+// Messages sent from the browser to the renderer.
+
+// Informs the renderer that the permission request for |request_id| is done,
+// and has been settled with |result|.
+IPC_MESSAGE_ROUTED2(PlatformNotificationMsg_PermissionRequestComplete,
+ int /* request_id */,
+ blink::WebNotificationPermission /* result */)
+
+// Messages sent from the renderer to the browser.
+
+// Requests permission to display platform notifications for |origin|.
+IPC_MESSAGE_ROUTED2(PlatformNotificationHostMsg_RequestPermission,
+ GURL /* origin */,
+ int /* request_id */)

Powered by Google App Engine
This is Rietveld 408576698