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

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

Issue 2917683003: chromeos: Remove the last IME methods from ash::SystemTrayDelegate (Closed)
Patch Set: cleanup 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_util.cc ('k') | ash/system/ime/tray_ime_chromeos_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 85165a6752453521867557783ca8cb29d94ec4aa..537a4f1db48feed3c4c7e0b98b2d5596a50cbac1 100644
--- a/ash/system/ime/tray_ime_chromeos.cc
+++ b/ash/system/ime/tray_ime_chromeos.cc
@@ -11,9 +11,9 @@
#include "ash/shell.h"
#include "ash/shell_port.h"
#include "ash/strings/grit/ash_strings.h"
+#include "ash/system/ime/ime_util.h"
#include "ash/system/tray/system_tray.h"
#include "ash/system/tray/system_tray_controller.h"
-#include "ash/system/tray/system_tray_delegate.h"
#include "ash/system/tray/system_tray_notifier.h"
#include "ash/system/tray/tray_constants.h"
#include "ash/system/tray/tray_details_view.h"
@@ -215,8 +215,7 @@ bool TrayIME::ShouldShowKeyboardToggle() {
base::string16 TrayIME::GetDefaultViewLabel(bool show_ime_label) {
if (show_ime_label) {
- IMEInfo current;
- Shell::Get()->system_tray_delegate()->GetCurrentIME(&current);
+ IMEInfo current = ime_util::GetCurrentIME();
return current.name;
} else {
// Display virtual keyboard status instead.
@@ -268,12 +267,9 @@ void TrayIME::DestroyDetailedView() {
void TrayIME::OnIMERefresh() {
// Caches the current ime state.
- SystemTrayDelegate* delegate = Shell::Get()->system_tray_delegate();
- ime_list_.clear();
- property_list_.clear();
- delegate->GetCurrentIME(&current_ime_);
- delegate->GetAvailableIMEList(&ime_list_);
- delegate->GetCurrentIMEProperties(&property_list_);
+ current_ime_ = ime_util::GetCurrentIME();
+ ime_list_ = ime_util::GetAvailableIMEList();
+ property_list_ = ime_util::GetCurrentIMEProperties();
auto ime_state = InputMethodManager::Get()->GetActiveIMEState();
ime_managed_message_ =
ime_state->GetAllowedInputMethods().empty()
« no previous file with comments | « ash/system/ime/ime_util.cc ('k') | ash/system/ime/tray_ime_chromeos_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698