OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/chromeos/input_method/mock_input_method_manager.h" | 5 #include "chrome/browser/chromeos/input_method/mock_input_method_manager.h" |
6 | 6 |
7 namespace chromeos { | 7 namespace chromeos { |
8 namespace input_method { | 8 namespace input_method { |
9 | 9 |
10 MockInputMethodManager::MockInputMethodManager() | 10 MockInputMethodManager::MockInputMethodManager() |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 | 110 |
111 bool MockInputMethodManager::SwitchInputMethod( | 111 bool MockInputMethodManager::SwitchInputMethod( |
112 const ui::Accelerator& accelerator) { | 112 const ui::Accelerator& accelerator) { |
113 return true; | 113 return true; |
114 } | 114 } |
115 | 115 |
116 InputMethodDescriptor MockInputMethodManager::GetCurrentInputMethod() const { | 116 InputMethodDescriptor MockInputMethodManager::GetCurrentInputMethod() const { |
117 InputMethodDescriptor descriptor = | 117 InputMethodDescriptor descriptor = |
118 InputMethodDescriptor::GetFallbackInputMethodDescriptor(); | 118 InputMethodDescriptor::GetFallbackInputMethodDescriptor(); |
119 if (!current_input_method_id_.empty()) { | 119 if (!current_input_method_id_.empty()) { |
120 return InputMethodDescriptor(whitelist_, | 120 return InputMethodDescriptor(current_input_method_id_, |
121 current_input_method_id_, | |
122 descriptor.name(), | 121 descriptor.name(), |
123 descriptor.keyboard_layout(), | 122 descriptor.keyboard_layout(), |
124 descriptor.language_code()); | 123 descriptor.language_code()); |
125 } | 124 } |
126 return descriptor; | 125 return descriptor; |
127 } | 126 } |
128 | 127 |
129 InputMethodPropertyList | 128 InputMethodPropertyList |
130 MockInputMethodManager::GetCurrentInputMethodProperties() const { | 129 MockInputMethodManager::GetCurrentInputMethodProperties() const { |
131 return InputMethodPropertyList(); | 130 return InputMethodPropertyList(); |
132 } | 131 } |
133 | 132 |
134 XKeyboard* MockInputMethodManager::GetXKeyboard() { | 133 XKeyboard* MockInputMethodManager::GetXKeyboard() { |
135 return &xkeyboard_; | 134 return &xkeyboard_; |
136 } | 135 } |
137 | 136 |
138 InputMethodUtil* MockInputMethodManager::GetInputMethodUtil() { | 137 InputMethodUtil* MockInputMethodManager::GetInputMethodUtil() { |
139 return &util_; | 138 return &util_; |
140 } | 139 } |
141 | 140 |
142 } // namespace input_method | 141 } // namespace input_method |
143 } // namespace chromeos | 142 } // namespace chromeos |
OLD | NEW |