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

Unified Diff: components/arc/common/arc_host_messages.h

Issue 1475583002: Add IPC messages for ARC notification (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments Created 5 years, 1 month 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: components/arc/common/arc_host_messages.h
diff --git a/components/arc/common/arc_host_messages.h b/components/arc/common/arc_host_messages.h
index 116de0cce2b05582ce52d856229d562f858f42b5..b31a185bc7bb016d92dd26ebbe2b97b290271c37 100644
--- a/components/arc/common/arc_host_messages.h
+++ b/components/arc/common/arc_host_messages.h
@@ -7,7 +7,9 @@
#include "ipc/ipc_message_macros.h"
-#include "components/arc/common/arc_message_types.h"
+// Using relative paths since this file is shared between chromium and android.
+#include "arc_message_types.h"
+#include "arc_notification_types.h"
#define IPC_MESSAGE_START ArcInstanceHostMsgStart
@@ -15,3 +17,32 @@ IPC_ENUM_TRAITS_MAX_VALUE(arc::InstanceBootPhase, arc::InstanceBootPhase::LAST)
IPC_MESSAGE_CONTROL1(ArcInstanceHostMsg_InstanceBootPhase,
arc::InstanceBootPhase)
+
+// Enum for notification type.
+IPC_ENUM_TRAITS_MAX_VALUE(arc::ArcNotificationType,
+ arc::ArcNotificationType::NOTIFICATION_TYPE_LAST)
+
+// Struct for notification data.
+IPC_STRUCT_TRAITS_BEGIN(arc::ArcNotificationData)
khmel1 2015/12/01 06:44:51 In my CL I put similar code into arc_messages_trai
yoshiki 2015/12/02 02:38:24 I think this can be in this file, since there is o
+ IPC_STRUCT_TRAITS_MEMBER(key)
+ IPC_STRUCT_TRAITS_MEMBER(type)
+ IPC_STRUCT_TRAITS_MEMBER(message)
+ IPC_STRUCT_TRAITS_MEMBER(title)
+ IPC_STRUCT_TRAITS_MEMBER(icon_mimetype)
+ IPC_STRUCT_TRAITS_MEMBER(icon_data)
+ IPC_STRUCT_TRAITS_MEMBER(priority)
+ IPC_STRUCT_TRAITS_MEMBER(timestamp)
+ IPC_STRUCT_TRAITS_MEMBER(progress_current)
+ IPC_STRUCT_TRAITS_MEMBER(progress_max)
+IPC_STRUCT_TRAITS_END()
+
+// Notifies that a notification is posted (created or updated) on Android with
hidehiko 2015/12/01 06:35:43 nit: Similar to the method name, it'd be probably
yoshiki 2015/12/02 02:38:24 Done.
+// the updated notification data.
+// |notification_data| is the data of notification (id, texts, icon and ...).
+IPC_MESSAGE_CONTROL1(ArcInstanceHostMsg_NotificationPosted,
+ arc::ArcNotificationData /* notification_data */);
+
+// Notifies that a notification is removed on Android.
+// |key| is the identifier of notification.
hidehiko 2015/12/01 06:35:43 nit: "the notification"
yoshiki 2015/12/02 02:38:24 Done.
+IPC_MESSAGE_CONTROL1(ArcInstanceHostMsg_NotificationRemoved,
+ std::string /* key */);

Powered by Google App Engine
This is Rietveld 408576698