OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Messages for platform-native notifications using the Web Notification API. | 5 // Messages for platform-native notifications using the Web Notification API. |
6 // Multiply-included message file, hence no include guard. | 6 // Multiply-included message file, hence no include guard. |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 // Messages sent from the browser to the renderer. | 56 // Messages sent from the browser to the renderer. |
57 | 57 |
58 // Informs the renderer that the browser has displayed the notification. | 58 // Informs the renderer that the browser has displayed the notification. |
59 IPC_MESSAGE_CONTROL1(PlatformNotificationMsg_DidShow, | 59 IPC_MESSAGE_CONTROL1(PlatformNotificationMsg_DidShow, |
60 int /* notification_id */) | 60 int /* notification_id */) |
61 | 61 |
62 // Informs the renderer that the notification has been closed. | 62 // Informs the renderer that the notification has been closed. |
63 IPC_MESSAGE_CONTROL1(PlatformNotificationMsg_DidClose, | 63 IPC_MESSAGE_CONTROL1(PlatformNotificationMsg_DidClose, |
64 int /* notification_id */) | 64 int /* notification_id */) |
65 | 65 |
66 // Informs the renderer that the notification has been clicked on. | 66 // Informs the renderer that the notification or one of its actions have been |
67 IPC_MESSAGE_CONTROL1(PlatformNotificationMsg_DidClick, | 67 // clicked on. |action_index| is the index of the action, or -1 if the main body |
68 int /* notification_id */) | 68 // of the notification was clicked. |
| 69 IPC_MESSAGE_CONTROL2(PlatformNotificationMsg_DidClick, |
| 70 int /* notification_id */, |
| 71 int /* action_index */) |
69 | 72 |
70 // Reply to PlatformNotificationHostMsg_ShowPersistent indicating that a | 73 // Reply to PlatformNotificationHostMsg_ShowPersistent indicating that a |
71 // persistent notification has been shown on the platform (if |success| is | 74 // persistent notification has been shown on the platform (if |success| is |
72 // true), or that an unspecified error occurred. | 75 // true), or that an unspecified error occurred. |
73 IPC_MESSAGE_CONTROL2(PlatformNotificationMsg_DidShowPersistent, | 76 IPC_MESSAGE_CONTROL2(PlatformNotificationMsg_DidShowPersistent, |
74 int /* request_id */, | 77 int /* request_id */, |
75 bool /* success */) | 78 bool /* success */) |
76 | 79 |
77 // Reply to PlatformNotificationHostMsg_GetNotifications sharing a vector of | 80 // Reply to PlatformNotificationHostMsg_GetNotifications sharing a vector of |
78 // available notifications per the request's constraints. | 81 // available notifications per the request's constraints. |
(...skipping 26 matching lines...) Expand all Loading... |
105 IPC_MESSAGE_CONTROL1(PlatformNotificationHostMsg_Close, | 108 IPC_MESSAGE_CONTROL1(PlatformNotificationHostMsg_Close, |
106 int /* notification_id */) | 109 int /* notification_id */) |
107 | 110 |
108 IPC_MESSAGE_CONTROL2(PlatformNotificationHostMsg_ClosePersistent, | 111 IPC_MESSAGE_CONTROL2(PlatformNotificationHostMsg_ClosePersistent, |
109 GURL /* origin */, | 112 GURL /* origin */, |
110 int64_t /* persistent_notification_id */) | 113 int64_t /* persistent_notification_id */) |
111 | 114 |
112 IPC_SYNC_MESSAGE_CONTROL1_1(PlatformNotificationHostMsg_CheckPermission, | 115 IPC_SYNC_MESSAGE_CONTROL1_1(PlatformNotificationHostMsg_CheckPermission, |
113 GURL /* origin */, | 116 GURL /* origin */, |
114 blink::WebNotificationPermission /* result */) | 117 blink::WebNotificationPermission /* result */) |
OLD | NEW |