Print Preview: Refactoring print/cancel button and print summary.
[chromium-blink-merge.git] / content / common / desktop_notification_messages.h
blobc8642e9005f075248414531aaa50dfaea6c4ce6b
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 "ipc/ipc_message_macros.h"
9 #include "googleurl/src/gurl.h"
10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebTextDirection.h"
12 #define IPC_MESSAGE_START DesktopNotificationMsgStart
14 IPC_STRUCT_BEGIN(DesktopNotificationHostMsg_Show_Params)
15 // URL which is the origin that created this notification.
16 IPC_STRUCT_MEMBER(GURL, origin)
18 // True if this is HTML
19 IPC_STRUCT_MEMBER(bool, is_html)
21 // URL which contains the HTML contents (if is_html is true), otherwise empty.
22 IPC_STRUCT_MEMBER(GURL, contents_url)
24 // Contents of the notification if is_html is false.
25 IPC_STRUCT_MEMBER(GURL, icon_url)
26 IPC_STRUCT_MEMBER(string16, title)
27 IPC_STRUCT_MEMBER(string16, body)
29 // Directionality of the notification.
30 IPC_STRUCT_MEMBER(WebKit::WebTextDirection, direction)
32 // ReplaceID if this notification should replace an existing one) may be
33 // empty if no replacement is called for.
34 IPC_STRUCT_MEMBER(string16, replace_id)
36 // Notification ID for sending events back for this notification.
37 IPC_STRUCT_MEMBER(int, notification_id)
38 IPC_STRUCT_END()
40 // Messages sent from the browser to the renderer.
42 // Used to inform the renderer that the browser has displayed its
43 // requested notification.
44 IPC_MESSAGE_ROUTED1(DesktopNotificationMsg_PostDisplay,
45 int /* notification_id */)
47 // Used to inform the renderer that the browser has encountered an error
48 // trying to display a notification.
49 IPC_MESSAGE_ROUTED2(DesktopNotificationMsg_PostError,
50 int /* notification_id */,
51 string16 /* message */)
53 // Informs the renderer that the one if its notifications has closed.
54 IPC_MESSAGE_ROUTED2(DesktopNotificationMsg_PostClose,
55 int /* notification_id */,
56 bool /* by_user */)
58 // Informs the renderer that one of its notifications was clicked on.
59 IPC_MESSAGE_ROUTED1(DesktopNotificationMsg_PostClick,
60 int /* notification_id */)
62 // Informs the renderer that the one if its notifications has closed.
63 IPC_MESSAGE_ROUTED1(DesktopNotificationMsg_PermissionRequestDone,
64 int /* request_id */)
66 // Messages sent from the renderer to the browser.
68 IPC_MESSAGE_ROUTED1(DesktopNotificationHostMsg_Show,
69 DesktopNotificationHostMsg_Show_Params)
71 IPC_MESSAGE_ROUTED1(DesktopNotificationHostMsg_Cancel,
72 int /* notification_id */)
74 IPC_MESSAGE_ROUTED2(DesktopNotificationHostMsg_RequestPermission,
75 GURL /* origin */,
76 int /* callback_context */)
78 IPC_SYNC_MESSAGE_ROUTED1_1(DesktopNotificationHostMsg_CheckPermission,
79 GURL /* source page */,
80 int /* permission_result */)