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

Unified Diff: ui/message_center/notification_list.h

Issue 11229022: Move ash/system/web_notification message_center to ui/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase again. Created 8 years, 2 months 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
« no previous file with comments | « ui/message_center/message_view.cc ('k') | ui/message_center/notification_list.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/message_center/notification_list.h
diff --git a/ash/system/web_notification/web_notification_list.h b/ui/message_center/notification_list.h
similarity index 76%
rename from ash/system/web_notification/web_notification_list.h
rename to ui/message_center/notification_list.h
index 74d06f420bc57a69d97001a1c127a5d3b6f8b979..158b890b7ee851526995409961de840ab6914eed 100644
--- a/ash/system/web_notification/web_notification_list.h
+++ b/ui/message_center/notification_list.h
@@ -2,23 +2,38 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef ASH_SYSTEM_WEB_NOTIFICATION_WEB_NOTIFICATION_LIST_H_
-#define ASH_SYSTEM_WEB_NOTIFICATION_WEB_NOTIFICATION_LIST_H_
+#ifndef UI_MESSAGE_CENTER_NOTIFICATION_LIST_H_
+#define UI_MESSAGE_CENTER_NOTIFICATION_LIST_H_
#include <list>
#include <string>
-#include "ash/ash_export.h"
-#include "ash/system/web_notification/web_notification.h"
+#include "base/string16.h"
+#include "ui/gfx/image/image_skia.h"
+#include "ui/message_center/message_center_export.h"
namespace message_center {
// A helper class to manage the list of notifications.
-class ASH_EXPORT WebNotificationList {
+class MESSAGE_CENTER_EXPORT NotificationList {
public:
- typedef std::list<WebNotification> Notifications;
+ struct MESSAGE_CENTER_EXPORT Notification {
+ Notification();
+ virtual ~Notification();
+
+ std::string id;
+ string16 title;
+ string16 message;
+ string16 display_source;
+ std::string extension_id;
+ gfx::ImageSkia image;
+ bool is_read; // True if this has been seen in the message center
+ bool shown_as_popup; // True if this has been shown as a popup notification
+ };
+
+ typedef std::list<Notification> Notifications;
- class ASH_EXPORT Delegate {
+ class MESSAGE_CENTER_EXPORT Delegate {
public:
Delegate() {}
virtual ~Delegate() {}
@@ -38,11 +53,11 @@ class ASH_EXPORT WebNotificationList {
virtual void OnNotificationClicked(const std::string& id) = 0;
// Returns the list of notifications to display.
- virtual WebNotificationList* GetNotificationList() = 0;
+ virtual NotificationList* GetNotificationList() = 0;
};
- explicit WebNotificationList(Delegate* delegate);
- virtual ~WebNotificationList();
+ explicit NotificationList(Delegate* delegate);
+ virtual ~NotificationList();
// Affects whether or not a message has been "read".
void SetMessageCenterVisible(bool visible);
@@ -97,7 +112,7 @@ class ASH_EXPORT WebNotificationList {
void EraseNotification(Notifications::iterator iter);
- void PushNotification(WebNotification& notification);
+ void PushNotification(Notification& notification);
// Returns the |kMaxVisiblePopupNotifications| least recent notifications
// that have not been shown as a popup.
@@ -109,9 +124,9 @@ class ASH_EXPORT WebNotificationList {
bool message_center_visible_;
size_t unread_count_;
- DISALLOW_COPY_AND_ASSIGN(WebNotificationList);
+ DISALLOW_COPY_AND_ASSIGN(NotificationList);
};
} // namespace message_center
-#endif // ASH_SYSTEM_WEB_NOTIFICATION_WEB_NOTIFICATION_LIST_H_
+#endif // UI_MESSAGE_CENTER_NOTIFICATION_LIST_H_
« no previous file with comments | « ui/message_center/message_view.cc ('k') | ui/message_center/notification_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698