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

Unified Diff: ui/message_center/views/message_popup_collection.cc

Issue 68713006: Enable notification collapse-expand under a flag. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address nit. Created 7 years, 1 month 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/views/message_center_view.cc ('k') | ui/message_center/views/notification_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/message_center/views/message_popup_collection.cc
diff --git a/ui/message_center/views/message_popup_collection.cc b/ui/message_center/views/message_popup_collection.cc
index 5355ad6962b5ceae2a5bff83d259546708d13cef..0e905e5747ab9b6429c296f824b9b0ac405a654d 100644
--- a/ui/message_center/views/message_popup_collection.cc
+++ b/ui/message_center/views/message_popup_collection.cc
@@ -19,6 +19,7 @@
#include "ui/gfx/screen.h"
#include "ui/message_center/message_center.h"
#include "ui/message_center/message_center_style.h"
+#include "ui/message_center/message_center_util.h"
#include "ui/message_center/notification.h"
#include "ui/message_center/notification_list.h"
#include "ui/message_center/views/notification_view.h"
@@ -129,11 +130,14 @@ void MessagePopupCollection::UpdateWidgets() {
if (FindToast((*iter)->id()))
continue;
+ bool expanded = true;
+ if (IsExperimentalNotificationUIEnabled())
+ expanded = (*iter)->is_expanded();
MessageView* view =
NotificationView::Create(*(*iter),
message_center_,
tray_,
- true, // Create expanded.
+ expanded,
true); // Create top-level notification.
int view_height = ToastContentsView::GetToastSizeForView(view).height();
int height_available = top_down ? work_area_.bottom() - base : base;
@@ -412,11 +416,14 @@ void MessagePopupCollection::OnNotificationUpdated(
if ((*iter)->id() != notification_id)
continue;
+ bool expanded = true;
+ if (IsExperimentalNotificationUIEnabled())
+ expanded = (*iter)->is_expanded();
MessageView* view =
NotificationView::Create(*(*iter),
message_center_,
tray_,
- true, // Create expanded.
+ expanded,
true); // Create top-level notification.
(*toast_iter)->SetContents(view);
updated = true;
« no previous file with comments | « ui/message_center/views/message_center_view.cc ('k') | ui/message_center/views/notification_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698