| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_view_factory.h" | 5 #include "ui/message_center/views/message_view_factory.h" |
| 6 | 6 |
| 7 #include "ui/message_center/notification_types.h" | 7 #include "ui/message_center/notification_types.h" |
| 8 #include "ui/message_center/views/custom_notification_view.h" | 8 #include "ui/message_center/views/custom_notification_view.h" |
| 9 #include "ui/message_center/views/notification_view.h" | 9 #include "ui/message_center/views/notification_view.h" |
| 10 | 10 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 // if an application is running on an older version of this code that | 36 // if an application is running on an older version of this code that |
| 37 // doesn't have the requested kind of notification template), we'll fall | 37 // doesn't have the requested kind of notification template), we'll fall |
| 38 // back to a notification instance that will provide at least basic | 38 // back to a notification instance that will provide at least basic |
| 39 // functionality. | 39 // functionality. |
| 40 LOG(WARNING) << "Unable to fulfill request for unrecognized " | 40 LOG(WARNING) << "Unable to fulfill request for unrecognized " |
| 41 << "notification type " << notification.type() << ". " | 41 << "notification type " << notification.type() << ". " |
| 42 << "Falling back to simple notification type."; | 42 << "Falling back to simple notification type."; |
| 43 notification_view = new NotificationView(controller, notification); | 43 notification_view = new NotificationView(controller, notification); |
| 44 } | 44 } |
| 45 | 45 |
| 46 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) | 46 #if defined(OS_LINUX) |
| 47 // Don't create shadows for notification toasts on linux wih aura. | 47 // Don't create shadows for notification toasts on Linux or CrOS. |
| 48 if (top_level) | 48 if (top_level) |
| 49 return notification_view; | 49 return notification_view; |
| 50 #endif | 50 #endif |
| 51 | 51 |
| 52 #if defined(OS_WIN) | 52 #if defined(OS_WIN) |
| 53 // Don't create shadows for notifications on Windows under classic theme. | 53 // Don't create shadows for notifications on Windows under classic theme. |
| 54 if (top_level && !ui::win::IsAeroGlassEnabled()) { | 54 if (top_level && !ui::win::IsAeroGlassEnabled()) { |
| 55 return notification_view; | 55 return notification_view; |
| 56 } | 56 } |
| 57 #endif // OS_WIN | 57 #endif // OS_WIN |
| 58 | 58 |
| 59 notification_view->CreateShadowBorder(); | 59 notification_view->CreateShadowBorder(); |
| 60 return notification_view; | 60 return notification_view; |
| 61 } | 61 } |
| 62 | 62 |
| 63 } // namespace message_center | 63 } // namespace message_center |
| OLD | NEW |