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 20 matching lines...) Expand all Loading... |
31 } | 31 } |
32 | 32 |
33 void MockInputMethodManager::RemoveCandidateWindowObserver( | 33 void MockInputMethodManager::RemoveCandidateWindowObserver( |
34 InputMethodManager::CandidateWindowObserver* observer) { | 34 InputMethodManager::CandidateWindowObserver* observer) { |
35 } | 35 } |
36 | 36 |
37 scoped_ptr<InputMethodDescriptors> | 37 scoped_ptr<InputMethodDescriptors> |
38 MockInputMethodManager::GetSupportedInputMethods() const { | 38 MockInputMethodManager::GetSupportedInputMethods() const { |
39 scoped_ptr<InputMethodDescriptors> result(new InputMethodDescriptors); | 39 scoped_ptr<InputMethodDescriptors> result(new InputMethodDescriptors); |
40 result->push_back( | 40 result->push_back( |
41 InputMethodDescriptor::GetFallbackInputMethodDescriptor()); | 41 InputMethodUtil::GetFallbackInputMethodDescriptor()); |
42 return result.Pass(); | 42 return result.Pass(); |
43 } | 43 } |
44 | 44 |
45 scoped_ptr<InputMethodDescriptors> | 45 scoped_ptr<InputMethodDescriptors> |
46 MockInputMethodManager::GetActiveInputMethods() const { | 46 MockInputMethodManager::GetActiveInputMethods() const { |
47 scoped_ptr<InputMethodDescriptors> result(new InputMethodDescriptors); | 47 scoped_ptr<InputMethodDescriptors> result(new InputMethodDescriptors); |
48 result->push_back( | 48 result->push_back( |
49 InputMethodDescriptor::GetFallbackInputMethodDescriptor()); | 49 InputMethodUtil::GetFallbackInputMethodDescriptor()); |
50 return result.Pass(); | 50 return result.Pass(); |
51 } | 51 } |
52 | 52 |
53 size_t MockInputMethodManager::GetNumActiveInputMethods() const { | 53 size_t MockInputMethodManager::GetNumActiveInputMethods() const { |
54 return 1; | 54 return 1; |
55 } | 55 } |
56 | 56 |
57 void MockInputMethodManager::EnableLayouts(const std::string& language_code, | 57 void MockInputMethodManager::EnableLayouts(const std::string& language_code, |
58 const std::string& initial_layout) { | 58 const std::string& initial_layout) { |
59 } | 59 } |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 return true; | 105 return true; |
106 } | 106 } |
107 | 107 |
108 bool MockInputMethodManager::SwitchInputMethod( | 108 bool MockInputMethodManager::SwitchInputMethod( |
109 const ui::Accelerator& accelerator) { | 109 const ui::Accelerator& accelerator) { |
110 return true; | 110 return true; |
111 } | 111 } |
112 | 112 |
113 InputMethodDescriptor MockInputMethodManager::GetCurrentInputMethod() const { | 113 InputMethodDescriptor MockInputMethodManager::GetCurrentInputMethod() const { |
114 InputMethodDescriptor descriptor = | 114 InputMethodDescriptor descriptor = |
115 InputMethodDescriptor::GetFallbackInputMethodDescriptor(); | 115 InputMethodUtil::GetFallbackInputMethodDescriptor(); |
116 if (!current_input_method_id_.empty()) { | 116 if (!current_input_method_id_.empty()) { |
117 return InputMethodDescriptor(current_input_method_id_, | 117 return InputMethodDescriptor(current_input_method_id_, |
118 descriptor.name(), | 118 descriptor.name(), |
119 descriptor.keyboard_layout(), | 119 descriptor.keyboard_layout(), |
120 descriptor.language_code(), | 120 descriptor.language_code(), |
121 "", // options page url. | 121 "", // options page url. |
122 false); | 122 false); |
123 } | 123 } |
124 return descriptor; | 124 return descriptor; |
125 } | 125 } |
(...skipping 20 matching lines...) Expand all Loading... |
146 delegate_.set_active_locale(value); | 146 delegate_.set_active_locale(value); |
147 } | 147 } |
148 | 148 |
149 void MockInputMethodManager::set_hardware_keyboard_layout( | 149 void MockInputMethodManager::set_hardware_keyboard_layout( |
150 const std::string& value) { | 150 const std::string& value) { |
151 delegate_.set_hardware_keyboard_layout(value); | 151 delegate_.set_hardware_keyboard_layout(value); |
152 } | 152 } |
153 | 153 |
154 } // namespace input_method | 154 } // namespace input_method |
155 } // namespace chromeos | 155 } // namespace chromeos |
OLD | NEW |