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 "chromeos/dbus/ibus/mock_ibus_client.h" | 5 #include "chromeos/dbus/ibus/mock_ibus_client.h" |
6 | 6 |
7 namespace chromeos { | 7 namespace chromeos { |
8 | 8 |
9 MockIBusClient::MockIBusClient() | 9 MockIBusClient::MockIBusClient() |
10 : create_input_context_call_count_(0) { | 10 : create_input_context_call_count_(0) { |
11 } | 11 } |
12 | 12 |
13 MockIBusClient::~MockIBusClient() {} | 13 MockIBusClient::~MockIBusClient() {} |
14 | 14 |
15 void MockIBusClient::CreateInputContext( | 15 void MockIBusClient::CreateInputContext( |
16 const std::string& client_name, | 16 const std::string& client_name, |
17 const CreateInputContextCallback& callback, | 17 const CreateInputContextCallback& callback, |
18 const ErrorCallback& error_callback) { | 18 const ErrorCallback& error_callback) { |
19 create_input_context_call_count_ ++; | 19 create_input_context_call_count_++; |
20 if (!create_input_context_handler_.is_null()) | 20 if (!create_input_context_handler_.is_null()) |
21 create_input_context_handler_.Run(client_name, callback, error_callback); | 21 create_input_context_handler_.Run(client_name, callback, error_callback); |
22 } | 22 } |
23 | 23 |
24 void MockIBusClient::RegisterComponent( | 24 void MockIBusClient::RegisterComponent( |
25 const ibus::IBusComponent& ibus_component, | 25 const IBusComponent& ibus_component, |
26 const RegisterComponentCallback& callback, | 26 const RegisterComponentCallback& callback, |
27 const ErrorCallback& error_callback) { | 27 const ErrorCallback& error_callback) { |
28 register_component_call_count_ ++; | 28 register_component_call_count_++; |
29 if (!register_component_handler_.is_null()) | 29 if (!register_component_handler_.is_null()) |
30 register_component_handler_.Run(ibus_component, callback, error_callback); | 30 register_component_handler_.Run(ibus_component, callback, error_callback); |
31 } | 31 } |
32 | 32 |
33 void MockIBusClient::SetGlobalEngine(const std::string& engine_name, | 33 void MockIBusClient::SetGlobalEngine(const std::string& engine_name, |
34 const ErrorCallback& error_callback) { | 34 const ErrorCallback& error_callback) { |
35 } | 35 } |
36 | 36 |
37 void MockIBusClient::Exit(ExitOption option, | 37 void MockIBusClient::Exit(ExitOption option, |
38 const ErrorCallback& error_callback) { | 38 const ErrorCallback& error_callback) { |
39 } | 39 } |
40 | 40 |
41 } // namespace chromeos | 41 } // namespace chromeos |
OLD | NEW |