Chromium Code Reviews| Index: ash/system/chromeos/tray_display.cc |
| diff --git a/ash/system/chromeos/tray_display.cc b/ash/system/chromeos/tray_display.cc |
| index b5814c1304f39c7bdc5835b17bd001905e128155..6caac1405755f545ddb13d051a31a65595251758 100644 |
| --- a/ash/system/chromeos/tray_display.cc |
| +++ b/ash/system/chromeos/tray_display.cc |
| @@ -14,6 +14,7 @@ |
| #include "ash/system/tray/system_tray_delegate.h" |
| #include "ash/system/tray/tray_constants.h" |
| #include "ash/system/tray/tray_notification_view.h" |
| +#include "ash/wm/maximize_mode/maximize_mode_controller.h" |
| #include "base/bind.h" |
| #include "base/strings/string_util.h" |
| #include "base/strings/utf_string_conversions.h" |
| @@ -388,7 +389,17 @@ void TrayDisplay::CreateOrUpdateNotification( |
| message_center::RichNotificationData(), |
| new message_center::HandleNotificationClickedDelegate( |
| base::Bind(&OpenSettings)))); |
| - message_center::MessageCenter::Get()->AddNotification(notification.Pass()); |
| + |
| + message_center::MessageCenter* message_center = |
| + message_center::MessageCenter::Get(); |
| + MaximizeModeController* maximize_mode_controller = |
| + Shell::GetInstance()->maximize_mode_controller(); |
| + // Display notifications caused from physically rotating the device |
| + // would be annoying and not useful to the user. |
|
flackr
2014/05/14 20:12:41
Probably simply state that we don't display notifi
bruthig
2014/05/14 21:07:35
Done.
|
| + if (maximize_mode_controller && |
|
flackr
2014/05/14 20:12:41
Are there cases where this is called and MaximizeM
bruthig
2014/05/14 21:07:35
Done.
|
| + !maximize_mode_controller->in_set_screen_rotation()) { |
| + message_center->AddNotification(notification.Pass()); |
| + } |
|
flackr
2014/05/14 20:12:41
else dismiss an active notification if it exists?
bruthig
2014/05/14 21:07:35
Previous notifications are already dismissed above
|
| } |
| views::View* TrayDisplay::CreateDefaultView(user::LoginStatus status) { |