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..513b1b6a26055b192848fa294e3cc28fec9301f1 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 = |
|
stevenjb
2017/04/24 20:40:02
is_primary_display
yoshiki
2017/04/26 01:29:29
Done.
|
| + 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) |