Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(131)

Unified Diff: ash/system/ime/tray_ime_chromeos.h

Issue 2920883002: chromeos: Make ash system tray directly observe IME state changes (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/system/ime/ime_observer.h ('k') | ash/system/ime/tray_ime_chromeos.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/ime/tray_ime_chromeos.h
diff --git a/ash/system/ime/tray_ime_chromeos.h b/ash/system/ime/tray_ime_chromeos.h
index 46674e0c6efd52029f7d29f8cecba1b200077654..ebc14bc030a22fc7f8cdc6f5bf6f22d06a96b61d 100644
--- a/ash/system/ime/tray_ime_chromeos.h
+++ b/ash/system/ime/tray_ime_chromeos.h
@@ -8,12 +8,13 @@
#include <stddef.h>
#include "ash/system/accessibility_observer.h"
-#include "ash/system/ime/ime_observer.h"
#include "ash/system/ime_menu/ime_list_view.h"
#include "ash/system/tray/ime_info.h"
#include "ash/system/tray/system_tray_item.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"
namespace ash {
@@ -27,10 +28,13 @@ class TrayItemView;
// Controller for IME options in the system menu. Note this is separate from
// the "opt-in" IME menu which can appear as a button in the system tray
// area; that is controlled by ImeMenuTray.
-class ASH_EXPORT TrayIME : public SystemTrayItem,
- public IMEObserver,
- public AccessibilityObserver,
- public VirtualKeyboardObserver {
+class ASH_EXPORT TrayIME
+ : public SystemTrayItem,
+ public AccessibilityObserver,
+ public VirtualKeyboardObserver,
+ public chromeos::input_method::InputMethodManager::Observer,
+ public chromeos::input_method::InputMethodManager::ImeMenuObserver,
+ public ui::ime::InputMethodMenuManager::Observer {
public:
explicit TrayIME(SystemTray* system_tray);
~TrayIME() override;
@@ -63,9 +67,24 @@ class ASH_EXPORT TrayIME : public SystemTrayItem,
void DestroyDefaultView() override;
void DestroyDetailedView() override;
- // Overridden from IMEObserver.
- void OnIMERefresh() override;
- void OnIMEMenuActivationChanged(bool is_active) 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;
// Returns true input methods are managed by policy.
bool IsIMEManaged();
@@ -75,6 +94,7 @@ class ASH_EXPORT TrayIME : public SystemTrayItem,
// Decides if a tray icon should be shown.
bool ShouldShowImeTrayItem(size_t ime_count);
+
// Mandates behavior for the single IME case for the detailed IME list
// sub-view.
ImeListView::SingleImeBehavior GetSingleImeBehavior();
« no previous file with comments | « ash/system/ime/ime_observer.h ('k') | ash/system/ime/tray_ime_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698