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

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

Issue 2589163003: Add shadow/corner radius to notifications (toasts and in-center). (Closed)
Patch Set: . Created 3 years, 11 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) 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 #ifndef UI_MESSAGE_CENTER_VIEWS_TOAST_CONTENTS_VIEW_H_ 5 #ifndef UI_MESSAGE_CENTER_VIEWS_TOAST_CONTENTS_VIEW_H_
6 #define UI_MESSAGE_CENTER_VIEWS_TOAST_CONTENTS_VIEW_H_ 6 #define UI_MESSAGE_CENTER_VIEWS_TOAST_CONTENTS_VIEW_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 110
111 // Recalculates preferred size from underlying view and notifies about it. 111 // Recalculates preferred size from underlying view and notifies about it.
112 void UpdatePreferredSize(); 112 void UpdatePreferredSize();
113 113
114 // Initialization and update. 114 // Initialization and update.
115 void CreateWidget(PopupAlignmentDelegate* alignment_delegate); 115 void CreateWidget(PopupAlignmentDelegate* alignment_delegate);
116 116
117 // Immediately moves the toast without any sort of delay or animation. 117 // Immediately moves the toast without any sort of delay or animation.
118 void SetBoundsInstantly(gfx::Rect new_bounds); 118 void SetBoundsInstantly(gfx::Rect new_bounds);
119 119
120 // Given the bounds of a toast on the screen, compute the bouds for that 120 // Given the bounds of a toast on the screen, compute the bounds for that
121 // toast in 'closed' node_data. The 'closed' node_data is used as 121 // toast in 'closed' node_data. The 'closed' node_data is used as
122 // origin/destination 122 // origin/destination in reveal/closing animations.
123 // in reveal/closing animations.
124 gfx::Rect GetClosedToastBounds(gfx::Rect bounds); 123 gfx::Rect GetClosedToastBounds(gfx::Rect bounds);
125 124
126 void StartFadeIn(); 125 void StartFadeIn();
127 void StartFadeOut(); // Will call Widget::Close() when animation ends. 126 void StartFadeOut(); // Will call Widget::Close() when animation ends.
128 void OnBoundsAnimationEndedOrCancelled(const gfx::Animation* animation); 127 void OnBoundsAnimationEndedOrCancelled(const gfx::Animation* animation);
129 128
130 base::WeakPtr<MessagePopupCollection> collection_; 129 base::WeakPtr<MessagePopupCollection> collection_;
131 130
132 // Id if the corresponding Notification. 131 // Id if the corresponding Notification.
133 std::string id_; 132 std::string id_;
(...skipping 11 matching lines...) Expand all
145 144
146 gfx::Point origin_; 145 gfx::Point origin_;
147 gfx::Size preferred_size_; 146 gfx::Size preferred_size_;
148 147
149 DISALLOW_COPY_AND_ASSIGN(ToastContentsView); 148 DISALLOW_COPY_AND_ASSIGN(ToastContentsView);
150 }; 149 };
151 150
152 } // namespace message_center 151 } // namespace message_center
153 152
154 #endif // UI_MESSAGE_CENTER_VIEWS_TOAST_CONTENTS_VIEW_H_ 153 #endif // UI_MESSAGE_CENTER_VIEWS_TOAST_CONTENTS_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698