Index: ash/system/ime_menu/ime_menu_tray.h |
diff --git a/ash/system/ime_menu/ime_menu_tray.h b/ash/system/ime_menu/ime_menu_tray.h |
index 3019158ca16a44b27b0c322790fd85925b298a7b..61e6607371ef9c11559eaad30b4676c0a0733da7 100644 |
--- a/ash/system/ime_menu/ime_menu_tray.h |
+++ b/ash/system/ime_menu/ime_menu_tray.h |
@@ -6,12 +6,13 @@ |
#define ASH_SYSTEM_IME_MENU_IME_MENU_TRAY_H_ |
#include "ash/ash_export.h" |
-#include "ash/system/ime/ime_observer.h" |
#include "ash/system/tray/ime_info.h" |
#include "ash/system/tray/tray_background_view.h" |
#include "ash/system/tray/tray_bubble_wrapper.h" |
#include "ash/system/virtual_keyboard/virtual_keyboard_observer.h" |
#include "base/macros.h" |
+#include "ui/base/ime/chromeos/input_method_manager.h" |
+#include "ui/chromeos/ime/input_method_menu_manager.h" |
#include "ui/keyboard/keyboard_controller_observer.h" |
#include "ui/views/bubble/tray_bubble_view.h" |
@@ -26,11 +27,14 @@ class ImeListView; |
// IME (e.g., 'GB', 'US'). Clicking this button opens the opt-in IME menu, |
// a standalone bubble displaying a list of available IMEs along with buttons |
// for emoji, handwriting, and voice. |
-class ASH_EXPORT ImeMenuTray : public TrayBackgroundView, |
- public IMEObserver, |
- public views::TrayBubbleView::Delegate, |
- public keyboard::KeyboardControllerObserver, |
- public VirtualKeyboardObserver { |
+class ASH_EXPORT ImeMenuTray |
+ : public TrayBackgroundView, |
+ public views::TrayBubbleView::Delegate, |
+ public keyboard::KeyboardControllerObserver, |
+ public VirtualKeyboardObserver, |
+ public chromeos::input_method::InputMethodManager::Observer, |
+ public chromeos::input_method::InputMethodManager::ImeMenuObserver, |
+ public ui::ime::InputMethodMenuManager::Observer { |
public: |
explicit ImeMenuTray(Shelf* shelf); |
~ImeMenuTray() override; |
@@ -63,9 +67,24 @@ class ASH_EXPORT ImeMenuTray : public TrayBackgroundView, |
void ClickedOutsideBubble() override; |
bool PerformAction(const ui::Event& event) override; |
- // IMEObserver: |
- void OnIMERefresh() override; |
- void OnIMEMenuActivationChanged(bool is_activated) override; |
+ void RefreshCurrentIme(); |
+ |
+ // chromeos::input_method::InputMethodManager::Observer: |
+ void InputMethodChanged(chromeos::input_method::InputMethodManager* manager, |
+ Profile* profile, |
+ bool show_message) override; |
+ |
+ // chromeos::input_method::InputMethodManager::ImeMenuObserver: |
+ void ImeMenuActivationChanged(bool is_active) override; |
+ void ImeMenuListChanged() override; |
+ void ImeMenuItemsChanged( |
+ const std::string& engine_id, |
+ const std::vector<chromeos::input_method::InputMethodManager::MenuItem>& |
+ items) override; |
+ |
+ // ui::ime::InputMethodMenuManager::Observer: |
+ void InputMethodMenuItemChanged( |
+ ui::ime::InputMethodMenuManager* manager) override; |
// views::TrayBubbleView::Delegate: |
void BubbleViewDestroyed() override; |