OLD | NEW |
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/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
420 animator_.reset(new views::BoundsAnimator(this)); | 420 animator_.reset(new views::BoundsAnimator(this)); |
421 animator_->AddObserver(this); | 421 animator_->AddObserver(this); |
422 } | 422 } |
423 | 423 |
424 if (!clearing_all_views_.empty()) { | 424 if (!clearing_all_views_.empty()) { |
425 AnimateClearingOneNotification(); | 425 AnimateClearingOneNotification(); |
426 return; | 426 return; |
427 } | 427 } |
428 | 428 |
429 if (top_down_ || | 429 if (top_down_ || |
430 CommandLine::ForCurrentProcess()->HasSwitch( | 430 base::CommandLine::ForCurrentProcess()->HasSwitch( |
431 switches::kEnableMessageCenterAlwaysScrollUpUponNotificationRemoval)) | 431 switches::kEnableMessageCenterAlwaysScrollUpUponNotificationRemoval)) |
432 AnimateNotificationsBelowTarget(); | 432 AnimateNotificationsBelowTarget(); |
433 else | 433 else |
434 AnimateNotificationsAboveTarget(); | 434 AnimateNotificationsAboveTarget(); |
435 | 435 |
436 adding_views_.clear(); | 436 adding_views_.clear(); |
437 deleting_views_.clear(); | 437 deleting_views_.clear(); |
438 } | 438 } |
439 | 439 |
440 void MessageListView::AnimateNotificationsBelowTarget() { | 440 void MessageListView::AnimateNotificationsBelowTarget() { |
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1008 scroller_->InvalidateLayout(); | 1008 scroller_->InvalidateLayout(); |
1009 PreferredSizeChanged(); | 1009 PreferredSizeChanged(); |
1010 Layout(); | 1010 Layout(); |
1011 } | 1011 } |
1012 | 1012 |
1013 void MessageCenterView::SetNotificationViewForTest(MessageView* view) { | 1013 void MessageCenterView::SetNotificationViewForTest(MessageView* view) { |
1014 message_list_view_->AddNotificationAt(view, 0); | 1014 message_list_view_->AddNotificationAt(view, 0); |
1015 } | 1015 } |
1016 | 1016 |
1017 } // namespace message_center | 1017 } // namespace message_center |
OLD | NEW |