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

Unified Diff: ui/message_center/views/message_center_view.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/message_center_style.h ('k') | ui/message_center/views/message_popup_collection.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/message_center/views/message_center_view.cc
diff --git a/ui/message_center/views/message_center_view.cc b/ui/message_center/views/message_center_view.cc
index 64b6696d85daad75e1a543834e563c61ff089bdb..d54069488726a5fd10239c63399a24560a84410c 100644
--- a/ui/message_center/views/message_center_view.cc
+++ b/ui/message_center/views/message_center_view.cc
@@ -21,6 +21,7 @@
#include "ui/message_center/message_center.h"
#include "ui/message_center/message_center_style.h"
#include "ui/message_center/message_center_types.h"
+#include "ui/message_center/message_center_util.h"
#include "ui/message_center/views/message_center_button_bar.h"
#include "ui/message_center/views/message_view.h"
#include "ui/message_center/views/notification_view.h"
@@ -925,11 +926,14 @@ void MessageCenterView::OnNotificationUpdated(const std::string& id) {
++iter, ++index) {
DCHECK((*iter)->id() == message_views_[index]->notification_id());
if ((*iter)->id() == id) {
+ bool expanded = true;
+ if (IsExperimentalNotificationUIEnabled())
+ expanded = (*iter)->is_expanded();
MessageView* view =
NotificationView::Create(*(*iter),
message_center_,
tray_,
- true, // Create expanded.
+ expanded,
false); // Not creating a top-level
// notification.
view->set_scroller(scroller_);
@@ -985,11 +989,14 @@ void MessageCenterView::AddNotificationAt(const Notification& notification,
int index) {
// NotificationViews are expanded by default here until
// http://crbug.com/217902 is fixed. TODO(dharcourt): Fix.
+ bool expanded = true;
+ if (IsExperimentalNotificationUIEnabled())
+ expanded = notification.is_expanded();
MessageView* view =
NotificationView::Create(notification,
message_center_,
tray_,
- true, // Create expanded.
+ expanded,
false); // Not creating a top-level
// notification.
view->set_scroller(scroller_);
« no previous file with comments | « ui/message_center/message_center_style.h ('k') | ui/message_center/views/message_popup_collection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698