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 /ash | |
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 'ash')
-rw-r--r-- | ash/shell/window_type_launcher.cc | 3 | ||||
-rw-r--r-- | ash/system/web_notification/web_notification_tray_unittest.cc | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/ash/shell/window_type_launcher.cc b/ash/shell/window_type_launcher.cc index 09843bc..a853a64b 100644 --- a/ash/shell/window_type_launcher.cc +++ b/ash/shell/window_type_launcher.cc @@ -22,6 +22,7 @@ #include "ui/aura/window.h" #include "ui/compositor/layer.h" #include "ui/gfx/canvas.h" +#include "ui/message_center/notification_types.h" #include "ui/views/controls/button/text_button.h" #include "ui/views/controls/menu/menu_item_view.h" #include "ui/views/controls/menu/menu_runner.h" @@ -342,7 +343,7 @@ void WindowTypeLauncher::ButtonPressed(views::Button* sender, } else if (sender == show_web_notification_) { ash::Shell::GetPrimaryRootWindowController()->status_area_widget()-> web_notification_tray()->message_center()->AddNotification( - ui::notifications::NOTIFICATION_TYPE_SIMPLE, + message_center::NOTIFICATION_TYPE_SIMPLE, "id0", ASCIIToUTF16("Test Shell Web Notification"), ASCIIToUTF16("Notification message body."), diff --git a/ash/system/web_notification/web_notification_tray_unittest.cc b/ash/system/web_notification/web_notification_tray_unittest.cc index 23ff2ff..ae43b76 100644 --- a/ash/system/web_notification/web_notification_tray_unittest.cc +++ b/ash/system/web_notification/web_notification_tray_unittest.cc @@ -16,7 +16,7 @@ #include "ui/message_center/message_center_tray.h" #include "ui/message_center/message_popup_bubble.h" #include "ui/message_center/notification_list.h" -#include "ui/notifications/notification_types.h" +#include "ui/message_center/notification_types.h" #include "ui/views/controls/label.h" #include "ui/views/layout/fill_layout.h" #include "ui/views/view.h" @@ -74,7 +74,7 @@ class TestDelegate : public message_center::MessageCenter::Delegate { void AddNotification(WebNotificationTray* tray, const std::string& id) { notification_ids_.insert(id); get_message_center()->AddNotification( - ui::notifications::NOTIFICATION_TYPE_SIMPLE, + message_center::NOTIFICATION_TYPE_SIMPLE, id, ASCIIToUTF16("Test Web Notification"), ASCIIToUTF16("Notification message body."), |