ozone: evdev: Sync caps lock LED state to evdev
[chromium-blink-merge.git] / content / common / platform_notification_messages.h
blob778574c6bd58011121106d95a8ec4ec8d687b5c3
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
3 // found in the LICENSE file.
5 // Messages for platform-native notifications using the Web Notification API.
6 // Multiply-included message file, hence no include guard.
8 #include "content/public/common/platform_notification_data.h"
9 #include "ipc/ipc_message_macros.h"
10 #include "third_party/WebKit/public/platform/modules/notifications/WebNotificationPermission.h"
11 #include "third_party/skia/include/core/SkBitmap.h"
13 #define IPC_MESSAGE_START PlatformNotificationMsgStart
15 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebNotificationPermission,
16 blink::WebNotificationPermissionLast)
18 IPC_ENUM_TRAITS_MAX_VALUE(
19 content::PlatformNotificationData::NotificationDirection,
20 content::PlatformNotificationData::NotificationDirectionLast)
22 IPC_STRUCT_TRAITS_BEGIN(content::PlatformNotificationData)
23 IPC_STRUCT_TRAITS_MEMBER(title)
24 IPC_STRUCT_TRAITS_MEMBER(direction)
25 IPC_STRUCT_TRAITS_MEMBER(lang)
26 IPC_STRUCT_TRAITS_MEMBER(body)
27 IPC_STRUCT_TRAITS_MEMBER(tag)
28 IPC_STRUCT_TRAITS_MEMBER(icon)
29 IPC_STRUCT_TRAITS_END()
31 // Messages sent from the browser to the renderer.
33 // Informs the renderer that the browser has displayed the notification.
34 IPC_MESSAGE_CONTROL1(PlatformNotificationMsg_DidShow,
35 int /* notification_id */)
37 // Informs the renderer that the notification has been closed.
38 IPC_MESSAGE_CONTROL1(PlatformNotificationMsg_DidClose,
39 int /* notification_id */)
41 // Informs the renderer that the notification has been clicked on.
42 IPC_MESSAGE_CONTROL1(PlatformNotificationMsg_DidClick,
43 int /* notification_id */)
45 // Messages sent from the renderer to the browser.
47 IPC_MESSAGE_CONTROL4(PlatformNotificationHostMsg_Show,
48 int /* notification_id */,
49 GURL /* origin */,
50 SkBitmap /* icon */,
51 content::PlatformNotificationData /* notification_data */)
53 IPC_MESSAGE_CONTROL4(PlatformNotificationHostMsg_ShowPersistent,
54 int64 /* service_worker_provider_id */,
55 GURL /* origin */,
56 SkBitmap /* icon */,
57 content::PlatformNotificationData /* notification_data */)
59 IPC_MESSAGE_CONTROL1(PlatformNotificationHostMsg_Close,
60 int /* notification_id */)
62 IPC_MESSAGE_CONTROL1(PlatformNotificationHostMsg_ClosePersistent,
63 std::string /* persistent_notification_id */)
65 IPC_SYNC_MESSAGE_CONTROL1_1(PlatformNotificationHostMsg_CheckPermission,
66 GURL /* origin */,
67 blink::WebNotificationPermission /* result */)