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

Unified Diff: ash/system/web_notification/web_notification_tray.cc

Issue 18247002: Remove the most obvious dead code from message center. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Pull out more code. Created 7 years, 6 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
Index: ash/system/web_notification/web_notification_tray.cc
diff --git a/ash/system/web_notification/web_notification_tray.cc b/ash/system/web_notification/web_notification_tray.cc
index 7569509bfdf2872744c1fd70a2e7ffb75ce64032..2a5405370d676f2e9d3ea132ef96b675160decf0 100644
--- a/ash/system/web_notification/web_notification_tray.cc
+++ b/ash/system/web_notification/web_notification_tray.cc
@@ -29,7 +29,6 @@
#include "ui/message_center/message_center_util.h"
#include "ui/message_center/views/message_bubble_base.h"
#include "ui/message_center/views/message_center_bubble.h"
-#include "ui/message_center/views/message_popup_bubble.h"
#include "ui/message_center/views/message_popup_collection.h"
#include "ui/views/bubble/tray_bubble_view.h"
#include "ui/views/controls/button/custom_button.h"
@@ -272,21 +271,14 @@ bool WebNotificationTray::ShowPopups() {
!status_area_widget()->ShouldShowWebNotifications()) {
return false;
}
- if (message_center::IsRichNotificationEnabled()) {
- // No bubble wrappers here, since |popup_collection_| is not a bubble but a
- // collection of widgets.
- popup_collection_.reset(new message_center::MessagePopupCollection(
- ash::Shell::GetContainer(
- GetWidget()->GetNativeView()->GetRootWindow(),
- internal::kShellWindowId_StatusContainer),
- message_center(),
- message_center_tray_.get()));
- } else {
- message_center::MessagePopupBubble* popup_bubble =
- new message_center::MessagePopupBubble(message_center());
- popup_bubble_.reset(new internal::WebNotificationBubbleWrapper(
- this, popup_bubble));
- }
+
+ popup_collection_.reset(new message_center::MessagePopupCollection(
+ ash::Shell::GetContainer(
+ GetWidget()->GetNativeView()->GetRootWindow(),
+ internal::kShellWindowId_StatusContainer),
+ message_center(),
+ message_center_tray_.get()));
+
return true;
}
@@ -531,12 +523,4 @@ WebNotificationTray::GetMessageCenterBubbleForTest() {
message_center_bubble()->bubble());
}
-message_center::MessagePopupBubble*
-WebNotificationTray::GetPopupBubbleForTest() {
- if (!popup_bubble())
- return NULL;
- return static_cast<message_center::MessagePopupBubble*>(
- popup_bubble()->bubble());
-}
-
} // namespace ash

Powered by Google App Engine
This is Rietveld 408576698