Chromium Code Reviews| Index: ui/message_center/views/message_popup_collection.cc |
| diff --git a/ui/message_center/views/message_popup_collection.cc b/ui/message_center/views/message_popup_collection.cc |
| index 0a2afc4caa5640e5fbf5418c1365456bc70a6c47..bb766c7fd03a38c771ed8bfdd107cd00cabd1830 100644 |
| --- a/ui/message_center/views/message_popup_collection.cc |
| +++ b/ui/message_center/views/message_popup_collection.cc |
| @@ -173,6 +173,10 @@ void MessagePopupCollection::UpdateWidgets() { |
| bool top_down = alignment_delegate_->IsTopDown(); |
| int base = GetBaseLine(toasts_.empty() ? NULL : toasts_.back()); |
| +#if defined(OS_CHROMEOS) |
| + bool isPrimaryDisplay = |
| + alignment_delegate_->IsPrimaryDisplayForNotification(); |
| +#endif |
| // Iterate in the reverse order to keep the oldest toasts on screen. Newer |
| // items may be ignored if there are no room to place them. |
| @@ -181,6 +185,14 @@ void MessagePopupCollection::UpdateWidgets() { |
| if (FindToast((*iter)->id())) |
| continue; |
| +#if defined(OS_CHROMEOS) |
| + // Disables popup of custom notification on non-primary displays. |
| + // Chrome OS shows popups on all displays but custom notification can be |
| + // visible only on one display at the same time. |
| + if (!isPrimaryDisplay && (*iter)->type() == NOTIFICATION_TYPE_CUSTOM) |
| + continue; |
| +#endif |
| + |
| MessageView* view; |
| // Create top-level notification. |
| #if defined(OS_CHROMEOS) |
| @@ -239,6 +251,7 @@ void MessagePopupCollection::UpdateWidgets() { |
| toast, ui::AX_EVENT_ALERT); |
| } |
| + LOG(ERROR) << "POPUP: " << (*iter)->id(); |
|
yhanada
2017/04/21 09:02:23
remove?
yoshiki
2017/04/21 09:58:05
Done.
|
| message_center_->DisplayedNotification( |
| (*iter)->id(), message_center::DISPLAY_SOURCE_POPUP); |
| } |