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/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
(...skipping 916 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
927 message_views_[index] = view; | 927 message_views_[index] = view; |
928 NotificationsChanged(); | 928 NotificationsChanged(); |
929 break; | 929 break; |
930 } | 930 } |
931 } | 931 } |
932 } | 932 } |
933 | 933 |
934 void MessageCenterView::AnimationEnded(const ui::Animation* animation) { | 934 void MessageCenterView::AnimationEnded(const ui::Animation* animation) { |
935 DCHECK_EQ(animation, settings_transition_animation_.get()); | 935 DCHECK_EQ(animation, settings_transition_animation_.get()); |
936 | 936 |
| 937 Visibility visibility = target_view_ == settings_view_ |
| 938 ? VISIBILITY_SETTINGS |
| 939 : VISIBILITY_MESSAGE_CENTER; |
| 940 message_center_->SetVisibility(visibility); |
| 941 |
937 source_view_->SetVisible(false); | 942 source_view_->SetVisible(false); |
938 target_view_->SetVisible(true); | 943 target_view_->SetVisible(true); |
939 if (source_view_->layer()) | 944 if (source_view_->layer()) |
940 source_view_->layer()->SetOpacity(1.0); | 945 source_view_->layer()->SetOpacity(1.0); |
941 if (target_view_->layer()) | 946 if (target_view_->layer()) |
942 target_view_->layer()->SetOpacity(1.0); | 947 target_view_->layer()->SetOpacity(1.0); |
943 settings_transition_animation_.reset(); | 948 settings_transition_animation_.reset(); |
944 PreferredSizeChanged(); | 949 PreferredSizeChanged(); |
945 Layout(); | 950 Layout(); |
946 } | 951 } |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
993 scroller_->InvalidateLayout(); | 998 scroller_->InvalidateLayout(); |
994 PreferredSizeChanged(); | 999 PreferredSizeChanged(); |
995 Layout(); | 1000 Layout(); |
996 } | 1001 } |
997 | 1002 |
998 void MessageCenterView::SetNotificationViewForTest(views::View* view) { | 1003 void MessageCenterView::SetNotificationViewForTest(views::View* view) { |
999 message_list_view_->AddNotificationAt(view, 0); | 1004 message_list_view_->AddNotificationAt(view, 0); |
1000 } | 1005 } |
1001 | 1006 |
1002 } // namespace message_center | 1007 } // namespace message_center |
OLD | NEW |