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 // This file implements the input method candidate window used on Chrome OS.
7 #ifndef CHROME_BROWSER_CHROMEOS_INPUT_METHOD_CANDIDATE_WINDOW_CONTROLLER_H_
8 #define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_CANDIDATE_WINDOW_CONTROLLER_H_
10 #include "base/basictypes.h"
13 namespace input_method
{
15 // CandidateWindowController is used for controlling the input method
16 // candidate window. Once the initialization is done, the controller
17 // starts monitoring signals sent from the the background input method
18 // daemon, and shows and hides the candidate window as neeeded. Upon
19 // deletion of the object, monitoring stops and the view used for
20 // rendering the candidate view is deleted.
21 class CandidateWindowController
{
25 virtual ~Observer() {}
27 virtual void CandidateClicked(int index
) = 0;
28 virtual void CandidateWindowOpened() = 0;
29 virtual void CandidateWindowClosed() = 0;
32 virtual ~CandidateWindowController() {}
34 virtual void AddObserver(Observer
* observer
) = 0;
35 virtual void RemoveObserver(Observer
* observer
) = 0;
36 virtual void Hide() = 0;
38 // Gets an instance of CandidateWindowController. Caller has to delete the
40 static CandidateWindowController
* CreateCandidateWindowController();
43 } // namespace input_method
44 } // namespace chromeos
46 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_CANDIDATE_WINDOW_CONTROLLER_H_