Home | History | Annotate | Download | only in input_method
      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.
      4 
      5 #include "chrome/browser/chromeos/input_method/mock_candidate_window_controller.h"
      6 
      7 namespace chromeos {
      8 namespace input_method {
      9 
     10 MockCandidateWindowController::MockCandidateWindowController()
     11     : add_observer_count_(0),
     12       remove_observer_count_(0),
     13       hide_count_(0) {
     14 }
     15 
     16 MockCandidateWindowController::~MockCandidateWindowController() {
     17 }
     18 
     19 void MockCandidateWindowController::AddObserver(
     20     CandidateWindowController::Observer* observer) {
     21   ++add_observer_count_;
     22   observers_.AddObserver(observer);
     23 }
     24 
     25 void MockCandidateWindowController::RemoveObserver(
     26     CandidateWindowController::Observer* observer) {
     27   ++remove_observer_count_;
     28   observers_.RemoveObserver(observer);
     29 }
     30 
     31 void MockCandidateWindowController::Hide() {
     32   ++hide_count_;
     33 }
     34 
     35 void MockCandidateWindowController::NotifyCandidateWindowOpened() {
     36   FOR_EACH_OBSERVER(CandidateWindowController::Observer, observers_,
     37                     CandidateWindowOpened());
     38 }
     39 
     40 void MockCandidateWindowController::NotifyCandidateWindowClosed() {
     41   FOR_EACH_OBSERVER(CandidateWindowController::Observer, observers_,
     42                     CandidateWindowClosed());
     43 }
     44 
     45 }  // namespace input_method
     46 }  // namespace chromeos
     47