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
3 // found in the LICENSE file.
5 #include "chromeos/dbus/ibus/mock_ibus_client.h"
9 MockIBusClient::MockIBusClient()
10 : create_input_context_call_count_(0) {
13 MockIBusClient::~MockIBusClient() {}
15 void MockIBusClient::CreateInputContext(
16 const std::string
& client_name
,
17 const CreateInputContextCallback
& callback
,
18 const ErrorCallback
& error_callback
) {
19 create_input_context_call_count_
++;
20 if (!create_input_context_handler_
.is_null())
21 create_input_context_handler_
.Run(client_name
, callback
, error_callback
);
24 void MockIBusClient::RegisterComponent(
25 const IBusComponent
& ibus_component
,
26 const RegisterComponentCallback
& callback
,
27 const ErrorCallback
& error_callback
) {
28 register_component_call_count_
++;
29 if (!register_component_handler_
.is_null())
30 register_component_handler_
.Run(ibus_component
, callback
, error_callback
);
33 void MockIBusClient::SetGlobalEngine(const std::string
& engine_name
,
34 const ErrorCallback
& error_callback
) {
37 void MockIBusClient::Exit(ExitOption option
,
38 const ErrorCallback
& error_callback
) {
41 } // namespace chromeos