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 "chrome/browser/chromeos/input_method/mock_candidate_window_controller.h"
8 namespace input_method
{
10 MockCandidateWindowController::MockCandidateWindowController()
11 : add_observer_count_(0),
12 remove_observer_count_(0),
16 MockCandidateWindowController::~MockCandidateWindowController() {
19 void MockCandidateWindowController::AddObserver(
20 CandidateWindowController::Observer
* observer
) {
21 ++add_observer_count_
;
22 observers_
.AddObserver(observer
);
25 void MockCandidateWindowController::RemoveObserver(
26 CandidateWindowController::Observer
* observer
) {
27 ++remove_observer_count_
;
28 observers_
.RemoveObserver(observer
);
31 void MockCandidateWindowController::Hide() {
35 void MockCandidateWindowController::NotifyCandidateWindowOpened() {
36 FOR_EACH_OBSERVER(CandidateWindowController::Observer
, observers_
,
37 CandidateWindowOpened());
40 void MockCandidateWindowController::NotifyCandidateWindowClosed() {
41 FOR_EACH_OBSERVER(CandidateWindowController::Observer
, observers_
,
42 CandidateWindowClosed());
45 } // namespace input_method
46 } // namespace chromeos