Home | History | Annotate | Download | only in ime
      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.
      4 
      5 #include "chromeos/ime/mock_ibus_daemon_controller.h"
      6 
      7 namespace chromeos {
      8 
      9 MockIBusDaemonController::MockIBusDaemonController()
     10   : start_count_(0),
     11     stop_count_(0) {
     12 }
     13 
     14 MockIBusDaemonController::~MockIBusDaemonController() {
     15 }
     16 
     17 void MockIBusDaemonController::AddObserver(Observer* observer) {
     18   observers_.AddObserver(observer);
     19 }
     20 
     21 void MockIBusDaemonController::RemoveObserver(Observer* observer) {
     22   observers_.RemoveObserver(observer);
     23 }
     24 
     25 bool MockIBusDaemonController::Start() {
     26   ++start_count_;
     27   return true;
     28 }
     29 
     30 bool MockIBusDaemonController::Stop() {
     31   ++stop_count_;
     32   return true;
     33 }
     34 
     35 void MockIBusDaemonController::EmulateConnect() {
     36   FOR_EACH_OBSERVER(Observer, observers_, OnConnected());
     37 }
     38 
     39 void MockIBusDaemonController::EmulateDisconnect() {
     40   FOR_EACH_OBSERVER(Observer, observers_, OnDisconnected());
     41 }
     42 
     43 
     44 }  // namespace chromeos
     45