1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 // IPC messages for desktop notification.
6 // Multiply-included message file, hence no include guard.
8 #include "content/public/common/show_desktop_notification_params.h"
9 #include "ipc/ipc_message_macros.h"
11 #define IPC_MESSAGE_START DesktopNotificationMsgStart
13 IPC_STRUCT_TRAITS_BEGIN(content::ShowDesktopNotificationHostMsgParams
)
14 IPC_STRUCT_TRAITS_MEMBER(origin
)
15 IPC_STRUCT_TRAITS_MEMBER(is_html
)
16 IPC_STRUCT_TRAITS_MEMBER(contents_url
)
17 IPC_STRUCT_TRAITS_MEMBER(icon_url
)
18 IPC_STRUCT_TRAITS_MEMBER(title
)
19 IPC_STRUCT_TRAITS_MEMBER(body
)
20 IPC_STRUCT_TRAITS_MEMBER(direction
)
21 IPC_STRUCT_TRAITS_MEMBER(replace_id
)
22 IPC_STRUCT_TRAITS_MEMBER(notification_id
)
23 IPC_STRUCT_TRAITS_END()
25 // Messages sent from the browser to the renderer.
27 // Used to inform the renderer that the browser has displayed its
28 // requested notification.
29 IPC_MESSAGE_ROUTED1(DesktopNotificationMsg_PostDisplay
,
30 int /* notification_id */)
32 // Used to inform the renderer that the browser has encountered an error
33 // trying to display a notification.
34 IPC_MESSAGE_ROUTED2(DesktopNotificationMsg_PostError
,
35 int /* notification_id */,
36 string16
/* message */)
38 // Informs the renderer that the one if its notifications has closed.
39 IPC_MESSAGE_ROUTED2(DesktopNotificationMsg_PostClose
,
40 int /* notification_id */,
43 // Informs the renderer that one of its notifications was clicked on.
44 IPC_MESSAGE_ROUTED1(DesktopNotificationMsg_PostClick
,
45 int /* notification_id */)
47 // Informs the renderer that the one if its notifications has closed.
48 IPC_MESSAGE_ROUTED1(DesktopNotificationMsg_PermissionRequestDone
,
51 // Messages sent from the renderer to the browser.
53 IPC_MESSAGE_ROUTED1(DesktopNotificationHostMsg_Show
,
54 content::ShowDesktopNotificationHostMsgParams
)
56 IPC_MESSAGE_ROUTED1(DesktopNotificationHostMsg_Cancel
,
57 int /* notification_id */)
59 IPC_MESSAGE_ROUTED2(DesktopNotificationHostMsg_RequestPermission
,
61 int /* callback_context */)
63 IPC_SYNC_MESSAGE_ROUTED1_1(DesktopNotificationHostMsg_CheckPermission
,
65 int /* permission_result */)