OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "base/logging.h" | 5 #include "base/logging.h" |
6 #include "chromeos/ime/component_extension_ime_manager.h" | 6 #include "chromeos/ime/component_extension_ime_manager.h" |
7 #include "chromeos/ime/extension_ime_util.h" | 7 #include "chromeos/ime/extension_ime_util.h" |
8 #include "chromeos/ime/mock_component_extension_ime_manager_delegate.h" | 8 #include "chromeos/ime/mock_component_extension_ime_manager_delegate.h" |
9 | 9 |
10 namespace chromeos { | 10 namespace chromeos { |
11 namespace input_method { | 11 namespace input_method { |
12 | 12 |
13 MockComponentExtIMEManagerDelegate::MockComponentExtIMEManagerDelegate() | 13 MockComponentExtIMEManagerDelegate::MockComponentExtIMEManagerDelegate() |
14 : load_call_count_(0), | 14 : load_call_count_(0), |
15 unload_call_count_(0) { | 15 unload_call_count_(0) { |
16 } | 16 } |
17 | 17 |
18 MockComponentExtIMEManagerDelegate::~MockComponentExtIMEManagerDelegate() { | 18 MockComponentExtIMEManagerDelegate::~MockComponentExtIMEManagerDelegate() { |
19 } | 19 } |
20 | 20 |
21 std::vector<ComponentExtensionIME> | 21 std::vector<ComponentExtensionIME> |
22 MockComponentExtIMEManagerDelegate::ListIME() { | 22 MockComponentExtIMEManagerDelegate::ListIME() { |
23 return ime_list_; | 23 return ime_list_; |
24 } | 24 } |
25 | 25 |
26 bool MockComponentExtIMEManagerDelegate::Load(Profile* profile, | 26 void MockComponentExtIMEManagerDelegate::Load(Profile* profile, |
27 const std::string& extension_id, | 27 const std::string& extension_id, |
28 const std::string& manifest, | 28 const std::string& manifest, |
29 const base::FilePath& path) { | 29 const base::FilePath& path) { |
30 last_loaded_extension_id_ = extension_id; | 30 last_loaded_extension_id_ = extension_id; |
31 load_call_count_++; | 31 load_call_count_++; |
32 return true; | |
33 } | 32 } |
34 | 33 |
35 void MockComponentExtIMEManagerDelegate::Unload(Profile* profile, | 34 void MockComponentExtIMEManagerDelegate::Unload(Profile* profile, |
36 const std::string& extension_id, | 35 const std::string& extension_id, |
37 const base::FilePath& path) { | 36 const base::FilePath& path) { |
38 unload_call_count_++; | 37 unload_call_count_++; |
39 last_unloaded_extension_id_ = extension_id; | 38 last_unloaded_extension_id_ = extension_id; |
40 } | 39 } |
41 | 40 |
42 } // namespace input_method | 41 } // namespace input_method |
43 } // namespace chromeos | 42 } // namespace chromeos |
OLD | NEW |