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

Unified Diff: components/arc/common/arc_notification_types.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_notification_types.h
diff --git a/components/arc/common/arc_notification_types.h b/components/arc/common/arc_notification_types.h
new file mode 100644
index 0000000000000000000000000000000000000000..9f011bcb55f4425986cff14231a73d6a108f3229
--- /dev/null
+++ b/components/arc/common/arc_notification_types.h
@@ -0,0 +1,57 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef COMPONENTS_ARC_COMMON_ARC_NOTIFICATION_DATA_H_
+#define COMPONENTS_ARC_COMMON_ARC_NOTIFICATION_DATA_H_
+
+#include <string>
+#include <vector>
+
+#include "base/time/time.h"
+
+namespace arc {
+
+// When you change any association between event and number, you must change
+// the code in com.android.server.ArcNotificationListenerService as well.
+enum ArcNotificationEvent {
+ NOTIFICATION_EVENT_BODY_CLICKED = 0,
+ NOTIFICATION_EVENT_CLOSED = 1,
+ // Five buttons at maximum (message_center::kNotificationMaximumItems = 5).
+ NOTIFICATION_EVENT_BUTTON1_CLICKED = 2,
+ NOTIFICATION_EVENT_BUTTON2_CLICKED = 3,
+ NOTIFICATION_EVENT_BUTTON3_CLICKED = 4,
+ NOTIFICATION_EVENT_BUTTON4_CLICKED = 5,
+ NOTIFICATION_EVENT_BUTTON5_CLICKED = 6,
+
+ // Last enum entry for IPC_ENUM_TRAITS
+ NOTIFICATION_EVENT_LAST = 6
+};
+
+enum ArcNotificationType {
+ NOTIFICATION_TYPE_BASIC = 0,
+ NOTIFICATION_TYPE_IMAGE,
+ NOTIFICATION_TYPE_PROGRESS,
+ NOTIFICATION_TYPE_LAST = NOTIFICATION_TYPE_PROGRESS
+};
+
+class ArcNotificationData {
khmel1 2015/12/01 06:44:51 Just question, do we really need arc::ArcNotificat
yoshiki 2015/12/02 02:38:24 I use "Arc" because "ArcBridgeService" has "Arc".
+ public:
+ ArcNotificationData();
+ ~ArcNotificationData();
+
+ std::string key;
+ ArcNotificationType type;
+ std::string message;
+ std::string title;
+ std::string icon_mimetype;
+ std::vector<uint8_t> icon_data;
+ int priority;
+ base::Time timestamp;
+ int progress_current;
+ int progress_max;
+};
+
+} // namespace arc
+
+#endif // COMPONENTS_ARC_COMMON_ARC_NOTIFICATION_DATA_H_

Powered by Google App Engine
This is Rietveld 408576698