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_->DisplayedNotification( |
| 190 (*iter)->id(), message_center::DISPLAY_SOURCE_POPUP); |
190 } | 191 } |
191 } | 192 } |
192 | 193 |
193 void MessagePopupCollection::OnMouseEntered(ToastContentsView* toast_entered) { | 194 void MessagePopupCollection::OnMouseEntered(ToastContentsView* toast_entered) { |
194 // Sometimes we can get two MouseEntered/MouseExited in a row when animating | 195 // 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. | 196 // toasts. So we need to keep track of which one is the currently active one. |
196 latest_toast_entered_ = toast_entered; | 197 latest_toast_entered_ = toast_entered; |
197 | 198 |
198 message_center_->PausePopupTimers(); | 199 message_center_->PausePopupTimers(); |
199 | 200 |
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
605 views::Widget* widget = (*iter)->GetWidget(); | 606 views::Widget* widget = (*iter)->GetWidget(); |
606 if (widget) | 607 if (widget) |
607 return widget->GetWindowBoundsInScreen(); | 608 return widget->GetWindowBoundsInScreen(); |
608 break; | 609 break; |
609 } | 610 } |
610 } | 611 } |
611 return gfx::Rect(); | 612 return gfx::Rect(); |
612 } | 613 } |
613 | 614 |
614 } // namespace message_center | 615 } // namespace message_center |
OLD | NEW |