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