Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / browser / chromeos / input_method / mock_candidate_window_controller.h
blob0cb1fdfde10b9c3734fe1761abaeb729d5e6afdd
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 #ifndef CHROME_BROWSER_CHROMEOS_INPUT_METHOD_MOCK_CANDIDATE_WINDOW_CONTROLLER_H_
6 #define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_MOCK_CANDIDATE_WINDOW_CONTROLLER_H_
8 #include "base/basictypes.h"
9 #include "base/observer_list.h"
10 #include "chrome/browser/chromeos/input_method/candidate_window_controller.h"
12 namespace chromeos {
13 namespace input_method {
15 // The mock CandidateWindowController implementation for testing.
16 class MockCandidateWindowController : public CandidateWindowController {
17 public:
18 MockCandidateWindowController();
19 virtual ~MockCandidateWindowController();
21 // CandidateWindowController overrides:
22 virtual void AddObserver(Observer* observer) OVERRIDE;
23 virtual void RemoveObserver(Observer* observer) OVERRIDE;
24 virtual void Hide() OVERRIDE;
26 // Notifies observers.
27 void NotifyCandidateWindowOpened();
28 void NotifyCandidateWindowClosed();
30 int add_observer_count_;
31 int remove_observer_count_;
32 int hide_count_;
34 private:
35 ObserverList<CandidateWindowController::Observer> observers_;
37 DISALLOW_COPY_AND_ASSIGN(MockCandidateWindowController);
40 } // namespace input_method
41 } // namespace chromeos
43 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_MOCK_CANDIDATE_WINDOW_CONTROLLER_H_