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

Side by Side 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, 1 month 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chromeos/ime/fake_ime_keyboard.h" 5 #include "chromeos/ime/fake_ime_keyboard.h"
6 6
7 namespace chromeos { 7 namespace chromeos {
8 namespace input_method { 8 namespace input_method {
9 9
10 FakeImeKeyboard::FakeImeKeyboard() 10 FakeImeKeyboard::FakeImeKeyboard()
11 : set_current_keyboard_layout_by_name_count_(0), 11 : set_current_keyboard_layout_by_name_count_(0),
12 caps_lock_is_enabled_(false),
12 auto_repeat_is_enabled_(false) { 13 auto_repeat_is_enabled_(false) {
13 } 14 }
14 15
15 FakeImeKeyboard::~FakeImeKeyboard() { 16 FakeImeKeyboard::~FakeImeKeyboard() {
16 } 17 }
17 18
19 void FakeImeKeyboard::AddObserver(Observer* observer) {
20 observers_.AddObserver(observer);
21 }
22
23 void FakeImeKeyboard::RemoveObserver(Observer* observer) {
24 observers_.RemoveObserver(observer);
25 }
26
18 bool FakeImeKeyboard::SetCurrentKeyboardLayoutByName( 27 bool FakeImeKeyboard::SetCurrentKeyboardLayoutByName(
19 const std::string& layout_name) { 28 const std::string& layout_name) {
20 ++set_current_keyboard_layout_by_name_count_; 29 ++set_current_keyboard_layout_by_name_count_;
21 last_layout_ = layout_name; 30 last_layout_ = layout_name;
22 return true; 31 return true;
23 } 32 }
24 33
25 bool FakeImeKeyboard::SetAutoRepeatRate(const AutoRepeatRate& rate) {
26 last_auto_repeat_rate_ = rate;
27 return true;
28 }
29
30 bool FakeImeKeyboard::SetAutoRepeatEnabled(bool enabled) {
31 auto_repeat_is_enabled_ = enabled;
32 return true;
33 }
34
35 bool FakeImeKeyboard::ReapplyCurrentKeyboardLayout() { 34 bool FakeImeKeyboard::ReapplyCurrentKeyboardLayout() {
36 return true; 35 return true;
37 } 36 }
38 37
39 void FakeImeKeyboard::ReapplyCurrentModifierLockStatus() { 38 void FakeImeKeyboard::ReapplyCurrentModifierLockStatus() {
40 } 39 }
41 40
42 void FakeImeKeyboard::DisableNumLock() { 41 void FakeImeKeyboard::DisableNumLock() {
43 } 42 }
44 43
44 void FakeImeKeyboard::SetCapsLockEnabled(bool enable_caps_lock) {
45 bool old_state = caps_lock_is_enabled_;
46 caps_lock_is_enabled_ = enable_caps_lock;
47 if (old_state != enable_caps_lock) {
48 FOR_EACH_OBSERVER(ImeKeyboard::Observer, observers_,
49 OnCapsLockChanged(enable_caps_lock));
50 }
51 }
52
53 bool FakeImeKeyboard::CapsLockIsEnabled() {
54 return caps_lock_is_enabled_;
55 }
56
45 bool FakeImeKeyboard::IsISOLevel5ShiftAvailable() const { 57 bool FakeImeKeyboard::IsISOLevel5ShiftAvailable() const {
46 return false; 58 return false;
47 } 59 }
48 60
49 bool FakeImeKeyboard::IsAltGrAvailable() const { 61 bool FakeImeKeyboard::IsAltGrAvailable() const {
50 return false; 62 return false;
51 } 63 }
52 64
65 bool FakeImeKeyboard::SetAutoRepeatEnabled(bool enabled) {
66 auto_repeat_is_enabled_ = enabled;
67 return true;
68 }
69
70 bool FakeImeKeyboard::SetAutoRepeatRate(const AutoRepeatRate& rate) {
71 last_auto_repeat_rate_ = rate;
72 return true;
73 }
74
53 } // namespace input_method 75 } // namespace input_method
54 } // namespace chromeos 76 } // namespace chromeos
OLDNEW
« 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