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

Unified Diff: ui/message_center/message_center.cc

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_center.h ('k') | ui/message_center/message_center.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/message_center/message_center.cc
diff --git a/ash/system/web_notification/message_center.cc b/ui/message_center/message_center.cc
similarity index 89%
rename from ash/system/web_notification/message_center.cc
rename to ui/message_center/message_center.cc
index 0032c97c8e9789cf8ecc1cfaa1228eff80050836..90b1990ae8819011c96946b627a663d838bd9431 100644
--- a/ash/system/web_notification/message_center.cc
+++ b/ui/message_center/message_center.cc
@@ -2,7 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ash/system/web_notification/message_center.h"
+#include "ui/message_center/message_center.h"
+
#include "base/logging.h"
namespace message_center {
@@ -12,7 +13,7 @@ namespace message_center {
MessageCenter::MessageCenter(Host* host)
: host_(host),
delegate_(NULL) {
- notification_list_.reset(new WebNotificationList(this));
+ notification_list_.reset(new NotificationList(this));
}
MessageCenter::~MessageCenter() {
@@ -80,7 +81,7 @@ void MessageCenter::SetNotificationImage(const std::string& id,
}
//------------------------------------------------------------------------------
-// Overridden from WebNotificationList::Delegate.
+// Overridden from NotificationList::Delegate.
void MessageCenter::SendRemoveNotification(const std::string& id) {
if (delegate_)
@@ -89,12 +90,12 @@ void MessageCenter::SendRemoveNotification(const std::string& id) {
void MessageCenter::SendRemoveAllNotifications() {
if (delegate_) {
- const WebNotificationList::Notifications& notifications =
+ const NotificationList::Notifications& notifications =
notification_list_->notifications();
- for (WebNotificationList::Notifications::const_iterator loopiter =
+ for (NotificationList::Notifications::const_iterator loopiter =
notifications.begin();
loopiter != notifications.end(); ) {
- WebNotificationList::Notifications::const_iterator curiter = loopiter++;
+ NotificationList::Notifications::const_iterator curiter = loopiter++;
std::string notification_id = curiter->id;
// May call RemoveNotification and erase curiter.
delegate_->NotificationRemoved(notification_id);
@@ -127,7 +128,7 @@ void MessageCenter::OnNotificationClicked(const std::string& id) {
delegate_->OnClicked(id);
}
-WebNotificationList* MessageCenter::GetNotificationList() {
+NotificationList* MessageCenter::GetNotificationList() {
return notification_list_.get();
}
« no previous file with comments | « ui/message_center/message_center.h ('k') | ui/message_center/message_center.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698