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

Side by Side Diff: ui/message_center/views/message_center_view.cc

Issue 2223583002: Merge "arc: Support custom notification size change" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2785
Patch Set: Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « ui/arc/notification/arc_custom_notification_view.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/message_center/views/message_center_view.h" 5 #include "ui/message_center/views/message_center_view.h"
6 6
7 #include <list> 7 #include <list>
8 #include <map> 8 #include <map>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 message_list_view_->ResetRepositionSession(); 390 message_list_view_->ResetRepositionSession();
391 391
392 // TODO(dimich): add MessageCenter::GetVisibleNotificationById(id) 392 // TODO(dimich): add MessageCenter::GetVisibleNotificationById(id)
393 MessageView* view = view_iter->second; 393 MessageView* view = view_iter->second;
394 const NotificationList::Notifications& notifications = 394 const NotificationList::Notifications& notifications =
395 message_center_->GetVisibleNotifications(); 395 message_center_->GetVisibleNotifications();
396 for (NotificationList::Notifications::const_iterator iter = 396 for (NotificationList::Notifications::const_iterator iter =
397 notifications.begin(); iter != notifications.end(); ++iter) { 397 notifications.begin(); iter != notifications.end(); ++iter) {
398 if ((*iter)->id() == id) { 398 if ((*iter)->id() == id) {
399 int old_width = view->width(); 399 int old_width = view->width();
400 int old_height = view->GetHeightForWidth(old_width); 400 int old_height = view->height();
401 message_list_view_->UpdateNotification(view, **iter); 401 message_list_view_->UpdateNotification(view, **iter);
402 if (view->GetHeightForWidth(old_width) != old_height) 402 if (view->GetHeightForWidth(old_width) != old_height)
403 Update(true /* animate */); 403 Update(true /* animate */);
404 break; 404 break;
405 } 405 }
406 } 406 }
407 } 407 }
408 408
409 void MessageCenterView::OnLockedStateChanged(bool locked) { 409 void MessageCenterView::OnLockedStateChanged(bool locked) {
410 is_locked_ = locked; 410 is_locked_ = locked;
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
623 // Disable the close-all button since no notification is visible. 623 // Disable the close-all button since no notification is visible.
624 button_bar_->SetCloseAllButtonEnabled(false); 624 button_bar_->SetCloseAllButtonEnabled(false);
625 } 625 }
626 } 626 }
627 627
628 void MessageCenterView::SetNotificationViewForTest(MessageView* view) { 628 void MessageCenterView::SetNotificationViewForTest(MessageView* view) {
629 message_list_view_->AddNotificationAt(view, 0); 629 message_list_view_->AddNotificationAt(view, 0);
630 } 630 }
631 631
632 } // namespace message_center 632 } // namespace message_center
OLDNEW
« no previous file with comments | « ui/arc/notification/arc_custom_notification_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698