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

Unified Diff: chromeos/ime/fake_ime_keyboard.cc

Issue 689873004: Revert of Adds ozone support for ime keyboard. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 | « chromeos/ime/fake_ime_keyboard.h ('k') | chromeos/ime/ime_keyboard.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/ime/fake_ime_keyboard.cc
diff --git a/chromeos/ime/fake_ime_keyboard.cc b/chromeos/ime/fake_ime_keyboard.cc
index 930565f242c733a59da98aae9cb7752e9f480237..d4bd0e0bb6f1813e2100042bc02e0bde915e2fd5 100644
--- a/chromeos/ime/fake_ime_keyboard.cc
+++ b/chromeos/ime/fake_ime_keyboard.cc
@@ -9,26 +9,25 @@
FakeImeKeyboard::FakeImeKeyboard()
: set_current_keyboard_layout_by_name_count_(0),
+ caps_lock_is_enabled_(false),
auto_repeat_is_enabled_(false) {
}
FakeImeKeyboard::~FakeImeKeyboard() {
}
+void FakeImeKeyboard::AddObserver(Observer* observer) {
+ observers_.AddObserver(observer);
+}
+
+void FakeImeKeyboard::RemoveObserver(Observer* observer) {
+ observers_.RemoveObserver(observer);
+}
+
bool FakeImeKeyboard::SetCurrentKeyboardLayoutByName(
const std::string& layout_name) {
++set_current_keyboard_layout_by_name_count_;
last_layout_ = layout_name;
- return true;
-}
-
-bool FakeImeKeyboard::SetAutoRepeatRate(const AutoRepeatRate& rate) {
- last_auto_repeat_rate_ = rate;
- return true;
-}
-
-bool FakeImeKeyboard::SetAutoRepeatEnabled(bool enabled) {
- auto_repeat_is_enabled_ = enabled;
return true;
}
@@ -42,6 +41,19 @@
void FakeImeKeyboard::DisableNumLock() {
}
+void FakeImeKeyboard::SetCapsLockEnabled(bool enable_caps_lock) {
+ bool old_state = caps_lock_is_enabled_;
+ caps_lock_is_enabled_ = enable_caps_lock;
+ if (old_state != enable_caps_lock) {
+ FOR_EACH_OBSERVER(ImeKeyboard::Observer, observers_,
+ OnCapsLockChanged(enable_caps_lock));
+ }
+}
+
+bool FakeImeKeyboard::CapsLockIsEnabled() {
+ return caps_lock_is_enabled_;
+}
+
bool FakeImeKeyboard::IsISOLevel5ShiftAvailable() const {
return false;
}
@@ -50,5 +62,15 @@
return false;
}
+bool FakeImeKeyboard::SetAutoRepeatEnabled(bool enabled) {
+ auto_repeat_is_enabled_ = enabled;
+ return true;
+}
+
+bool FakeImeKeyboard::SetAutoRepeatRate(const AutoRepeatRate& rate) {
+ last_auto_repeat_rate_ = rate;
+ return true;
+}
+
} // namespace input_method
} // namespace chromeos
« no previous file with comments | « chromeos/ime/fake_ime_keyboard.h ('k') | chromeos/ime/ime_keyboard.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698