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

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

Issue 2911303003: chromeos: Remove SystemTrayDelegate::GetIMEManagedMessage() (Closed)
Patch Set: rebase 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/strings/BUILD.gn ('k') | ash/system/ime_menu/ime_menu_tray_unittest.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.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(&current_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();
}
« no previous file with comments | « ash/strings/BUILD.gn ('k') | ash/system/ime_menu/ime_menu_tray_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698