Chromium Code Reviews| Index: ash/system/ime/tray_ime.cc |
| diff --git a/ash/system/ime/tray_ime.cc b/ash/system/ime/tray_ime.cc |
| index a06d018bbae978bff118db418e6a56888c0bb6c3..10f5b98d643d06b22d398ded351172abc6e85960 100644 |
| --- a/ash/system/ime/tray_ime.cc |
| +++ b/ash/system/ime/tray_ime.cc |
| @@ -15,6 +15,7 @@ |
| #include "ash/system/tray/tray_item_view.h" |
| #include "ash/system/tray/tray_notification_view.h" |
| #include "ash/system/tray/tray_views.h" |
| +#include "ash/wm/shelf_layout_manager.h" |
| #include "base/logging.h" |
| #include "base/timer.h" |
| #include "base/utf_string_conversions.h" |
| @@ -319,8 +320,15 @@ void TrayIME::OnIMERefresh(bool show_message) { |
| if (detailed_) |
| detailed_->Update(list, property_list); |
| - if (list.size() > 1 && show_message && !message_shown_) { |
| - if (!notification_) { |
| + if (list.size() > 1 && show_message) { |
| + // If the notification is still visible, hide it and clear the flag so it is |
| + // refreshed. |
| + if (notification_) { |
| + HideNotificationView(); |
|
sadrul
2012/08/01 15:00:41
Can we update the existing notification instead of
Zachary Kuznia
2012/08/02 01:51:18
Done.
|
| + message_shown_ = false; |
| + } |
| + |
| + if (!Shell::GetInstance()->shelf()->IsVisible() || !message_shown_) { |
| ShowNotificationView(); |
| message_shown_ = true; |
| } |