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