diff options
author | dimich@chromium.org <dimich@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-26 04:42:40 +0000 |
---|---|---|
committer | dimich@chromium.org <dimich@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-26 04:42:40 +0000 |
commit | 4c8f730b286880c832a30201efa7a7c4eecc6af5 (patch) | |
tree | 29b35f0ab660304b77a4199e6e3dd5397079d206 /chrome/browser/notifications/notification.h | |
parent | 25c05b94f5022d1821b1706f5073d41e70be4d35 (diff) | |
download | chromium_src-4c8f730b286880c832a30201efa7a7c4eecc6af5.zip chromium_src-4c8f730b286880c832a30201efa7a7c4eecc6af5.tar.gz chromium_src-4c8f730b286880c832a30201efa7a7c4eecc6af5.tar.bz2 |
Notifications refactor step 2.
Moved notification_types.* from ui/notifications -> ui/message_center (ui/notifications is removed)
Made message_center::Notification a class rather then a struct. Its lifetime is managed by NotificationList.
Moved UnpackOptionalFields from NotificationList to Notification, it is a private member used in ctor.
Removed 2-level collections (set<list>), now all notifications are stored in a std::list (the ScopedVector didn't work since it can't be sorted)
Use stable sort() to figure out the order of notifications in popups and NotificationCenter.
Changed order of notifications in NotificationListUnittest::MarkSinglePopupAsShown - need mukai@ to verify correctness.
NotificationList::RemoveNotification is now void since its bool result was not used.
In NotificationListUnittest, instead of /gtest.gyp:gtest_main include base.gyp:run_all_unittests to initialize ICU etc.
BUG=174164
Review URL: https://chromiumcodereview.appspot.com/12277024
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@184581 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/notifications/notification.h')
-rw-r--r-- | chrome/browser/notifications/notification.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/chrome/browser/notifications/notification.h b/chrome/browser/notifications/notification.h index 3feb6f8..c5658a7 100644 --- a/chrome/browser/notifications/notification.h +++ b/chrome/browser/notifications/notification.h @@ -15,7 +15,7 @@ #include "googleurl/src/gurl.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebTextDirection.h" #include "ui/gfx/image/image_skia.h" -#include "ui/notifications/notification_types.h" +#include "ui/message_center/notification_types.h" // Representation of a notification to be shown to the user. // On non-Ash platforms these are rendered as HTML, sometimes described by a @@ -43,7 +43,7 @@ class Notification { // Initializes a notification with a given type. Takes ownership of // optional_fields. - Notification(ui::notifications::NotificationType type, + Notification(message_center::NotificationType type, const GURL& origin_url, const GURL& icon_url, const string16& title, @@ -72,7 +72,7 @@ class Notification { // If this is a HTML notification. bool is_html() const { return is_html_; } - ui::notifications::NotificationType type() const { + message_center::NotificationType type() const { return type_; } @@ -118,7 +118,7 @@ class Notification { NotificationDelegate* delegate() const { return delegate_.get(); } // The type of notification we'd like displayed. - ui::notifications::NotificationType type_; + message_center::NotificationType type_; // The Origin of the page/worker which created this notification. GURL origin_url_; |