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 #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/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "ui/gfx/animation/animation_delegate.h" | 10 #include "ui/gfx/animation/animation_delegate.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 | 43 |
44 ToastContentsView(const std::string& notification_id, | 44 ToastContentsView(const std::string& notification_id, |
45 base::WeakPtr<MessagePopupCollection> collection); | 45 base::WeakPtr<MessagePopupCollection> collection); |
46 virtual ~ToastContentsView(); | 46 virtual ~ToastContentsView(); |
47 | 47 |
48 // Sets the inner view of the toast. If it has contents already, | 48 // Sets the inner view of the toast. If it has contents already, |
49 // |a11y_feedback_for_updates| causes the view to notify that the | 49 // |a11y_feedback_for_updates| causes the view to notify that the |
50 // accessibility message should be read after this update. | 50 // accessibility message should be read after this update. |
51 void SetContents(MessageView* view, bool a11y_feedback_for_updates); | 51 void SetContents(MessageView* view, bool a11y_feedback_for_updates); |
52 | 52 |
| 53 void UpdateContents(const Notification& notification, |
| 54 bool a11y_feedback_for_updates); |
| 55 |
53 // Shows the new toast for the first time, animated. | 56 // Shows the new toast for the first time, animated. |
54 // |origin| is the right-bottom corner of the toast. | 57 // |origin| is the right-bottom corner of the toast. |
55 void RevealWithAnimation(gfx::Point origin); | 58 void RevealWithAnimation(gfx::Point origin); |
56 | 59 |
57 // Disconnectes the toast from the rest of the system immediately and start | 60 // Disconnectes the toast from the rest of the system immediately and start |
58 // an animation. Once animation finishes, closes the widget. | 61 // an animation. Once animation finishes, closes the widget. |
59 void CloseWithAnimation(); | 62 void CloseWithAnimation(); |
60 | 63 |
61 void SetBoundsWithAnimation(gfx::Rect new_bounds); | 64 void SetBoundsWithAnimation(gfx::Rect new_bounds); |
62 | 65 |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 | 135 |
133 gfx::Point origin_; | 136 gfx::Point origin_; |
134 gfx::Size preferred_size_; | 137 gfx::Size preferred_size_; |
135 | 138 |
136 DISALLOW_COPY_AND_ASSIGN(ToastContentsView); | 139 DISALLOW_COPY_AND_ASSIGN(ToastContentsView); |
137 }; | 140 }; |
138 | 141 |
139 } // namespace message_center | 142 } // namespace message_center |
140 | 143 |
141 #endif // UI_MESSAGE_CENTER_VIEWS_TOAST_CONTENTS_VIEW_H_ | 144 #endif // UI_MESSAGE_CENTER_VIEWS_TOAST_CONTENTS_VIEW_H_ |
OLD | NEW |