OLD | NEW |
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 "chrome/browser/ui/webui/chromeos/login/l10n_util_test_util.h" | 5 #include "chrome/browser/ui/webui/chromeos/login/l10n_util_test_util.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "url/gurl.h" | 9 #include "url/gurl.h" |
10 | 10 |
11 namespace chromeos { | 11 namespace chromeos { |
12 | 12 |
13 MockInputMethodManagerWithInputMethods:: | 13 MockInputMethodManagerWithInputMethods:: |
14 MockInputMethodManagerWithInputMethods() { | 14 MockInputMethodManagerWithInputMethods() { |
15 } | 15 } |
16 | 16 |
17 MockInputMethodManagerWithInputMethods:: | 17 MockInputMethodManagerWithInputMethods:: |
18 ~MockInputMethodManagerWithInputMethods() { | 18 ~MockInputMethodManagerWithInputMethods() { |
19 } | 19 } |
20 | 20 |
21 scoped_ptr<input_method::InputMethodDescriptors> | 21 std::unique_ptr<input_method::InputMethodDescriptors> |
22 MockInputMethodManagerWithInputMethods::GetSupportedInputMethods() const { | 22 MockInputMethodManagerWithInputMethods::GetSupportedInputMethods() const { |
23 return scoped_ptr<input_method::InputMethodDescriptors>( | 23 return std::unique_ptr<input_method::InputMethodDescriptors>( |
24 new input_method::InputMethodDescriptors(descriptors_)); | 24 new input_method::InputMethodDescriptors(descriptors_)); |
25 } | 25 } |
26 | 26 |
27 void MockInputMethodManagerWithInputMethods::AddInputMethod( | 27 void MockInputMethodManagerWithInputMethods::AddInputMethod( |
28 const std::string& id, | 28 const std::string& id, |
29 const std::string& raw_layout, | 29 const std::string& raw_layout, |
30 const std::string& language_code) { | 30 const std::string& language_code) { |
31 std::vector<std::string> layouts; | 31 std::vector<std::string> layouts; |
32 layouts.push_back(raw_layout); | 32 layouts.push_back(raw_layout); |
33 std::vector<std::string> languages; | 33 std::vector<std::string> languages; |
34 languages.push_back(language_code); | 34 languages.push_back(language_code); |
35 descriptors_.push_back(input_method::InputMethodDescriptor( | 35 descriptors_.push_back(input_method::InputMethodDescriptor( |
36 id, std::string(), std::string(), layouts, languages, true, | 36 id, std::string(), std::string(), layouts, languages, true, |
37 GURL(), GURL())); | 37 GURL(), GURL())); |
38 } | 38 } |
39 | 39 |
40 } // namespace chromeos | 40 } // namespace chromeos |
OLD | NEW |