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

Unified Diff: ash/system/chromeos/tray_caps_lock.cc

Issue 232333002: ozone: Rename XKeyboard to KeyboardController & use fake under ozone (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rename to ImeKeyboard & rebase Created 6 years, 8 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/chromeos/tray_caps_lock.h ('k') | chrome/browser/chromeos/chrome_browser_main_chromeos.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/chromeos/tray_caps_lock.cc
diff --git a/ash/system/chromeos/tray_caps_lock.cc b/ash/system/chromeos/tray_caps_lock.cc
index d6a457d675700eeed97c180cbb3f7cc7653fbeb3..7c9925d558b6b2d013c54ed9f95372363ae9c67c 100644
--- a/ash/system/chromeos/tray_caps_lock.cc
+++ b/ash/system/chromeos/tray_caps_lock.cc
@@ -11,8 +11,8 @@
#include "ash/system/tray/system_tray_notifier.h"
#include "ash/system/tray/tray_constants.h"
#include "base/sys_info.h"
+#include "chromeos/ime/ime_keyboard.h"
#include "chromeos/ime/input_method_manager.h"
-#include "chromeos/ime/xkeyboard.h"
#include "grit/ash_resources.h"
#include "grit/ash_strings.h"
#include "ui/accessibility/ax_view_state.h"
@@ -29,8 +29,9 @@ namespace {
bool CapsLockIsEnabled() {
chromeos::input_method::InputMethodManager* ime =
chromeos::input_method::InputMethodManager::Get();
- return (ime && ime->GetXKeyboard()) ? ime->GetXKeyboard()->CapsLockIsEnabled()
- : false;
+ return (ime && ime->GetImeKeyboard())
+ ? ime->GetImeKeyboard()->CapsLockIsEnabled()
+ : false;
}
}
@@ -108,13 +109,13 @@ class CapsLockDefaultView : public ActionableView {
// Overridden from ActionableView:
virtual bool PerformAction(const ui::Event& event) OVERRIDE {
- chromeos::input_method::XKeyboard* xkeyboard =
- chromeos::input_method::InputMethodManager::Get()->GetXKeyboard();
+ chromeos::input_method::ImeKeyboard* keyboard =
+ chromeos::input_method::InputMethodManager::Get()->GetImeKeyboard();
Shell::GetInstance()->metrics()->RecordUserMetricsAction(
- xkeyboard->CapsLockIsEnabled() ?
+ keyboard->CapsLockIsEnabled() ?
ash::UMA_STATUS_AREA_CAPS_LOCK_DISABLED_BY_CLICK :
ash::UMA_STATUS_AREA_CAPS_LOCK_ENABLED_BY_CLICK);
- xkeyboard->SetCapsLockEnabled(!xkeyboard->CapsLockIsEnabled());
+ keyboard->SetCapsLockEnabled(!keyboard->CapsLockIsEnabled());
return true;
}
@@ -133,9 +134,9 @@ TrayCapsLock::TrayCapsLock(SystemTray* system_tray)
// Since keyboard handling differs between ChromeOS and Linux we need to
// use different observers depending on the two platforms.
if (base::SysInfo::IsRunningOnChromeOS()) {
- chromeos::input_method::XKeyboard* xkeyboard =
- chromeos::input_method::InputMethodManager::Get()->GetXKeyboard();
- xkeyboard->AddObserver(this);
+ chromeos::input_method::ImeKeyboard* keyboard =
+ chromeos::input_method::InputMethodManager::Get()->GetImeKeyboard();
+ keyboard->AddObserver(this);
} else {
Shell::GetInstance()->PrependPreTargetHandler(this);
}
@@ -145,9 +146,9 @@ TrayCapsLock::~TrayCapsLock() {
// Since keyboard handling differs between ChromeOS and Linux we need to
// use different observers depending on the two platforms.
if (base::SysInfo::IsRunningOnChromeOS()) {
- chromeos::input_method::XKeyboard* xkeyboard =
- chromeos::input_method::InputMethodManager::Get()->GetXKeyboard();
- xkeyboard->RemoveObserver(this);
+ chromeos::input_method::ImeKeyboard* keyboard =
+ chromeos::input_method::InputMethodManager::Get()->GetImeKeyboard();
+ keyboard->RemoveObserver(this);
} else {
Shell::GetInstance()->RemovePreTargetHandler(this);
}
« no previous file with comments | « ash/system/chromeos/tray_caps_lock.h ('k') | chrome/browser/chromeos/chrome_browser_main_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698