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_popup_collection.h" | 5 #include "ui/message_center/views/message_popup_collection.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/i18n/rtl.h" | 10 #include "base/i18n/rtl.h" |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 if (top_down) | 179 if (top_down) |
180 base += view_height + kToastMarginY; | 180 base += view_height + kToastMarginY; |
181 else | 181 else |
182 base -= view_height + kToastMarginY; | 182 base -= view_height + kToastMarginY; |
183 | 183 |
184 if (views::ViewsDelegate::views_delegate) { | 184 if (views::ViewsDelegate::views_delegate) { |
185 views::ViewsDelegate::views_delegate->NotifyAccessibilityEvent( | 185 views::ViewsDelegate::views_delegate->NotifyAccessibilityEvent( |
186 toast, ui::AX_EVENT_ALERT); | 186 toast, ui::AX_EVENT_ALERT); |
187 } | 187 } |
188 | 188 |
189 message_center_->DisplayedNotification((*iter)->id()); | 189 message_center_->PoppedUpNotification((*iter)->id()); |
190 } | 190 } |
191 } | 191 } |
192 | 192 |
193 void MessagePopupCollection::OnMouseEntered(ToastContentsView* toast_entered) { | 193 void MessagePopupCollection::OnMouseEntered(ToastContentsView* toast_entered) { |
194 // Sometimes we can get two MouseEntered/MouseExited in a row when animating | 194 // Sometimes we can get two MouseEntered/MouseExited in a row when animating |
195 // toasts. So we need to keep track of which one is the currently active one. | 195 // toasts. So we need to keep track of which one is the currently active one. |
196 latest_toast_entered_ = toast_entered; | 196 latest_toast_entered_ = toast_entered; |
197 | 197 |
198 message_center_->PausePopupTimers(); | 198 message_center_->PausePopupTimers(); |
199 | 199 |
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
605 views::Widget* widget = (*iter)->GetWidget(); | 605 views::Widget* widget = (*iter)->GetWidget(); |
606 if (widget) | 606 if (widget) |
607 return widget->GetWindowBoundsInScreen(); | 607 return widget->GetWindowBoundsInScreen(); |
608 break; | 608 break; |
609 } | 609 } |
610 } | 610 } |
611 return gfx::Rect(); | 611 return gfx::Rect(); |
612 } | 612 } |
613 | 613 |
614 } // namespace message_center | 614 } // namespace message_center |
OLD | NEW |