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

Side by Side Diff: ui/message_center/views/message_list_view.h

Issue 2696523002: Stop notifications from being clipped on resize. (Closed)
Patch Set: Add additional comments. Created 3 years, 10 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
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « ui/message_center/views/message_center_view_unittest.cc ('k') | ui/message_center/views/message_list_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698