Index: ash/system/ime/tray_ime.cc |
diff --git a/ash/system/ime/tray_ime.cc b/ash/system/ime/tray_ime.cc |
index beec2f5f02f99faeb0b177ff727f6dbc87100820..a2dafa4d7a5269c3a5b5de68168d939954d7aa6e 100644 |
--- a/ash/system/ime/tray_ime.cc |
+++ b/ash/system/ime/tray_ime.cc |
@@ -10,7 +10,6 @@ |
#include "ash/root_window_controller.h" |
#include "ash/shelf/shelf_widget.h" |
#include "ash/shell.h" |
-#include "ash/system/system_notifier.h" |
#include "ash/system/tray/hover_highlight_view.h" |
#include "ash/system/tray/system_tray.h" |
#include "ash/system/tray/system_tray_delegate.h" |
@@ -28,21 +27,10 @@ |
#include "ui/base/resource/resource_bundle.h" |
#include "ui/gfx/font.h" |
#include "ui/gfx/image/image.h" |
-#include "ui/message_center/message_center.h" |
-#include "ui/message_center/notification.h" |
-#include "ui/message_center/notification_delegate.h" |
#include "ui/views/controls/label.h" |
#include "ui/views/layout/box_layout.h" |
#include "ui/views/widget/widget.h" |
-using message_center::Notification; |
- |
-namespace { |
- |
-const char kIMENotificationId[] = "chrome://settings/ime"; |
- |
-} // namespace |
- |
namespace ash { |
namespace internal { |
namespace tray { |
@@ -189,16 +177,12 @@ TrayIME::TrayIME(SystemTray* system_tray) |
: SystemTrayItem(system_tray), |
tray_label_(NULL), |
default_(NULL), |
- detailed_(NULL), |
- message_shown_(false), |
- weak_factory_(this) { |
+ detailed_(NULL) { |
Shell::GetInstance()->system_tray_notifier()->AddIMEObserver(this); |
} |
TrayIME::~TrayIME() { |
Shell::GetInstance()->system_tray_notifier()->RemoveIMEObserver(this); |
- message_center::MessageCenter::Get()->RemoveNotification( |
- kIMENotificationId, false /* by_user */); |
} |
void TrayIME::UpdateTrayLabel(const IMEInfo& current, size_t count) { |
@@ -219,40 +203,6 @@ void TrayIME::UpdateTrayLabel(const IMEInfo& current, size_t count) { |
} |
} |
-void TrayIME::UpdateOrCreateNotification() { |
- message_center::MessageCenter* message_center = |
- message_center::MessageCenter::Get(); |
- |
- if (!message_center->HasNotification(kIMENotificationId) && message_shown_) |
- return; |
- |
- SystemTrayDelegate* delegate = Shell::GetInstance()->system_tray_delegate(); |
- IMEInfo current; |
- delegate->GetCurrentIME(¤t); |
- |
- ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); |
- scoped_ptr<Notification> notification(new Notification( |
- message_center::NOTIFICATION_TYPE_SIMPLE, |
- kIMENotificationId, |
- // TODO(zork): Use IDS_ASH_STATUS_TRAY_THIRD_PARTY_IME_TURNED_ON_BUBBLE |
- // for third party IMEs |
- l10n_util::GetStringFUTF16( |
- IDS_ASH_STATUS_TRAY_IME_TURNED_ON_BUBBLE, |
- current.medium_name), |
- base::string16(), // message |
- bundle.GetImageNamed(IDR_AURA_UBER_TRAY_IME), |
- base::string16(), // display_source |
- message_center::NotifierId( |
- message_center::NotifierId::SYSTEM_COMPONENT, |
- system_notifier::kNotifierInputMethod), |
- message_center::RichNotificationData(), |
- new message_center::HandleNotificationClickedDelegate( |
- base::Bind(&TrayIME::PopupDetailedView, |
- weak_factory_.GetWeakPtr(), 0, true)))); |
- message_center->AddNotification(notification.Pass()); |
- message_shown_ = true; |
-} |
- |
views::View* TrayIME::CreateTrayView(user::LoginStatus status) { |
CHECK(tray_label_ == NULL); |
tray_label_ = new TrayItemView(this); |
@@ -303,7 +253,7 @@ void TrayIME::UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) { |
tray_label_->Layout(); |
} |
-void TrayIME::OnIMERefresh(bool show_message) { |
+void TrayIME::OnIMERefresh() { |
SystemTrayDelegate* delegate = Shell::GetInstance()->system_tray_delegate(); |
IMEInfoList list; |
IMEInfo current; |
@@ -318,9 +268,6 @@ void TrayIME::OnIMERefresh(bool show_message) { |
default_->UpdateLabel(current); |
if (detailed_) |
detailed_->Update(list, property_list); |
- |
- if (list.size() > 1 && show_message) |
- UpdateOrCreateNotification(); |
} |
} // namespace internal |