| 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..3c6ab2afd11c437e2962c6a393c4f4394e9232d7
|
| --- /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 NotificationEvent {
|
| + NOTIFICATION_EVENT_BODY_CLICKED = 0,
|
| + // Five buttons at maximum (message_center::kNotificationMaximumItems = 5).
|
| + NOTIFICATION_EVENT_BUTTON1_CLICKED = 1,
|
| + NOTIFICATION_EVENT_BUTTON2_CLICKED = 2,
|
| + NOTIFICATION_EVENT_BUTTON3_CLICKED = 3,
|
| + NOTIFICATION_EVENT_BUTTON4_CLICKED = 4,
|
| + NOTIFICATION_EVENT_BUTTON5_CLICKED = 5,
|
| + NOTIFICATION_EVENT_CLOSED = 6,
|
| +
|
| + // Last enum entry for IPC_ENUM_TRAITS
|
| + NOTIFICATION_EVENT_LAST = 6
|
| +};
|
| +
|
| +enum ArcNotificationType {
|
| + NOTIFICATION_TYPE_BASIC = 0,
|
| + NOTIFICATION_TYPE_IMAGE,
|
| + NOTIFICATION_TYPE_PROGRESS,
|
| + NOTIFICAITON_TYPE_LAST = NOTIFICATION_TYPE_PROGRESS
|
| +};
|
| +
|
| +class ArcNotificationData {
|
| + public:
|
| + ArcNotificationData();
|
| + virtual ~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_
|
|
|