Index: ash/system/ime/tray_ime_chromeos.cc |
diff --git a/ash/system/ime/tray_ime_chromeos.cc b/ash/system/ime/tray_ime_chromeos.cc |
index 0b3d22c1b64120f5b11ca101b46186af5d4b06e9..85165a6752453521867557783ca8cb29d94ec4aa 100644 |
--- a/ash/system/ime/tray_ime_chromeos.cc |
+++ b/ash/system/ime/tray_ime_chromeos.cc |
@@ -26,8 +26,10 @@ |
#include "ash/system/tray_accessibility.h" |
#include "base/logging.h" |
#include "base/strings/utf_string_conversions.h" |
+#include "components/strings/grit/components_strings.h" |
#include "ui/accessibility/ax_enums.h" |
#include "ui/accessibility/ax_node_data.h" |
+#include "ui/base/ime/chromeos/input_method_manager.h" |
#include "ui/base/l10n/l10n_util.h" |
#include "ui/gfx/font.h" |
#include "ui/gfx/image/image.h" |
@@ -38,6 +40,8 @@ |
#include "ui/views/layout/box_layout.h" |
#include "ui/views/widget/widget.h" |
+using chromeos::input_method::InputMethodManager; |
+ |
namespace ash { |
namespace tray { |
@@ -270,7 +274,11 @@ void TrayIME::OnIMERefresh() { |
delegate->GetCurrentIME(¤t_ime_); |
delegate->GetAvailableIMEList(&ime_list_); |
delegate->GetCurrentIMEProperties(&property_list_); |
- ime_managed_message_ = delegate->GetIMEManagedMessage(); |
+ auto ime_state = InputMethodManager::Get()->GetActiveIMEState(); |
+ ime_managed_message_ = |
+ ime_state->GetAllowedInputMethods().empty() |
+ ? base::string16() |
+ : l10n_util::GetStringUTF16(IDS_OPTIONS_CONTROLLED_SETTING_POLICY); |
Update(); |
} |