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

Side by Side Diff: chromeos/ime/ime_keyboard_ozone.cc

Issue 683773002: 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
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/ime_keyboard_ozone.h"
6 #include "chromeos/ime/ime_keyboard.h"
7 6
8 namespace chromeos { 7 namespace chromeos {
9 namespace input_method { 8 namespace input_method {
10 9
10
11 ImeKeyboardOzone::ImeKeyboardOzone()
12 : set_current_keyboard_layout_by_name_count_(0),
13 caps_lock_is_enabled_(false),
14 auto_repeat_is_enabled_(false) {
15 }
16
17
18 ImeKeyboardOzone::~ImeKeyboardOzone() {
19 }
20
21 bool ImeKeyboardOzone::SetCurrentKeyboardLayoutByName(
22 const std::string& layout_name) {
23 // Call SetKeyMapping here.
24 // TODO: parse out layout name and variation.
25 return ImeKeyboard::SetCurrentKeyboardLayoutByName(layout_name);
26 }
27
28 void ImeKeyboardOzone::ReapplyCurrentKeyboardLayout() {
29 SetCurrentKeyboardLayoutByName(last_layout_);
30 }
31
32 void ImeKeyboardOzone::SetCapsLockEnabled(bool enable_caps_lock) {
33 // Call SetModifierStates here.
34 ImeKeyboard::SetCapsLockEnabled(enable_caps_lock);
35 }
36
37 bool ImeKeyboardOzone::CapsLockIsEnabled() {
38 // Call getModifierStates here.
39 return false;
40 }
41
42 void ImeKeyboardOzone::ReapplyCurrentModifierLockStatus() {
43 // call SetModifierStates here.
44 }
45
46 void ImeKeyboardOzone::DisableNumLock() {
47 SetCapsLockEnabled(caps_lock_is_enabled_);
48 }
49
50 bool ImeKeyboardOzone::SetAutoRepeatRate(const AutoRepeatRate& rate) {
51 return true;
52 }
53
54 bool ImeKeyboardOzone::SetAutoRepeatEnabled(bool enabled) {
55 return true;
56 }
57
11 // static 58 // static
12 ImeKeyboard* ImeKeyboard::Create() { 59 ImeKeyboard* ImeKeyboard::Create() {
13 return new FakeImeKeyboard; 60 return new ImeKeyboardOzone();
14 } 61 }
15 62
16 } // namespace input_method 63 } // namespace input_method
17 } // namespace chromeos 64 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698