| OLD | NEW |
| 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 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 #ifndef UI_MESSAGE_CENTER_VIEWS_MESSAGE_LIST_VIEW_H_ | 5 #ifndef UI_MESSAGE_CENTER_VIEWS_MESSAGE_LIST_VIEW_H_ |
| 6 #define UI_MESSAGE_CENTER_VIEWS_MESSAGE_LIST_VIEW_H_ | 6 #define UI_MESSAGE_CENTER_VIEWS_MESSAGE_LIST_VIEW_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <vector> |
| 10 | 11 |
| 11 #include "base/macros.h" | 12 #include "base/macros.h" |
| 12 #include "ui/compositor/paint_context.h" | 13 #include "ui/compositor/paint_context.h" |
| 13 #include "ui/gfx/geometry/rect.h" | 14 #include "ui/gfx/geometry/rect.h" |
| 14 #include "ui/gfx/geometry/size.h" | 15 #include "ui/gfx/geometry/size.h" |
| 15 #include "ui/message_center/message_center_export.h" | 16 #include "ui/message_center/message_center_export.h" |
| 16 #include "ui/message_center/notification.h" | 17 #include "ui/message_center/notification.h" |
| 17 #include "ui/views/animation/bounds_animator.h" | 18 #include "ui/views/animation/bounds_animator.h" |
| 18 #include "ui/views/animation/bounds_animator_observer.h" | 19 #include "ui/views/animation/bounds_animator_observer.h" |
| 19 #include "ui/views/view.h" | 20 #include "ui/views/view.h" |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 | 73 |
| 73 bool IsValidChild(const views::View* child) const; | 74 bool IsValidChild(const views::View* child) const; |
| 74 void DoUpdateIfPossible(); | 75 void DoUpdateIfPossible(); |
| 75 | 76 |
| 76 // Animates all notifications below target upwards to align with the top of | 77 // Animates all notifications below target upwards to align with the top of |
| 77 // the last closed notification. | 78 // the last closed notification. |
| 78 void AnimateNotificationsBelowTarget(); | 79 void AnimateNotificationsBelowTarget(); |
| 79 // Animates all notifications above target downwards to align with the top of | 80 // Animates all notifications above target downwards to align with the top of |
| 80 // the last closed notification. | 81 // the last closed notification. |
| 81 void AnimateNotificationsAboveTarget(); | 82 void AnimateNotificationsAboveTarget(); |
| 83 // Computes reposition offsets for |AnimateNotificationsAboveTarget|. |
| 84 std::vector<int> ComputeRepositionOffsets(const std::vector<int>& heights, |
| 85 const std::vector<bool>& deleting, |
| 86 int target_index, |
| 87 int padding); |
| 82 | 88 |
| 83 // Schedules animation for a child to the specified position. Returns false | 89 // Schedules animation for a child to the specified position. Returns false |
| 84 // if |child| will disappear after the animation. | 90 // if |child| will disappear after the animation. |
| 85 bool AnimateChild(views::View* child, | 91 bool AnimateChild(views::View* child, |
| 86 int top, | 92 int top, |
| 87 int height, | 93 int height, |
| 88 bool animate_even_on_move); | 94 bool animate_even_on_move); |
| 89 | 95 |
| 90 // Animate clearing one notification. | 96 // Animate clearing one notification. |
| 91 void AnimateClearingOneNotification(); | 97 void AnimateClearingOneNotification(); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 108 // This is just for tests and has no setter. | 114 // This is just for tests and has no setter. |
| 109 bool quit_message_loop_after_animation_for_test_; | 115 bool quit_message_loop_after_animation_for_test_; |
| 110 | 116 |
| 111 base::WeakPtrFactory<MessageListView> weak_ptr_factory_; | 117 base::WeakPtrFactory<MessageListView> weak_ptr_factory_; |
| 112 DISALLOW_COPY_AND_ASSIGN(MessageListView); | 118 DISALLOW_COPY_AND_ASSIGN(MessageListView); |
| 113 }; | 119 }; |
| 114 | 120 |
| 115 } // namespace message_center | 121 } // namespace message_center |
| 116 | 122 |
| 117 #endif // UI_MESSAGE_CENTER_VIEWS_MESSAGE_LIST_VIEW_H_ | 123 #endif // UI_MESSAGE_CENTER_VIEWS_MESSAGE_LIST_VIEW_H_ |
| OLD | NEW |