1 // Copyright (c) 2013 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 #ifndef CHROMEOS_IME_MOCK_IBUS_DAEMON_CONTROLLER_H_
6 #define CHROMEOS_IME_MOCK_IBUS_DAEMON_CONTROLLER_H_
8 #include "base/observer_list.h"
9 #include "chromeos/chromeos_export.h"
10 #include "chromeos/ime/ibus_daemon_controller.h"
14 // A mock implementation of IBusDaemonController.
15 class CHROMEOS_EXPORT MockIBusDaemonController
: public IBusDaemonController
{
17 MockIBusDaemonController();
18 virtual ~MockIBusDaemonController();
20 // IBusDaemonController overrides:
21 virtual void AddObserver(Observer
* observer
) OVERRIDE
;
22 virtual void RemoveObserver(Observer
* observer
) OVERRIDE
;
23 virtual bool Start() OVERRIDE
;
24 virtual bool Stop() OVERRIDE
;
26 // Emulates connecting/disconnecting the connection with ibus-daemon.
27 void EmulateConnect();
28 void EmulateDisconnect();
30 int start_count() { return start_count_
;}
31 int stop_count() { return stop_count_
;}
37 ObserverList
<Observer
> observers_
;
39 DISALLOW_COPY_AND_ASSIGN(MockIBusDaemonController
);
42 } // namespace chromeos
44 #endif // CHROMEOS_IME_MOCK_IBUS_DAEMON_CONTROLLER_H_