- add sources.
[platform/framework/web/crosswalk.git] / src / chrome / browser / chromeos / input_method / ibus_controller_impl.h
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 #ifndef CHROME_BROWSER_CHROMEOS_INPUT_METHOD_IBUS_CONTROLLER_IMPL_H_
6 #define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_IBUS_CONTROLLER_IMPL_H_
7
8 #include <string>
9 #include <vector>
10
11 #include "base/observer_list.h"
12 #include "chrome/browser/chromeos/input_method/ibus_controller.h"
13 #include "chromeos/ime/ibus_bridge.h"
14 #include "chromeos/ime/input_method_property.h"
15
16 namespace chromeos {
17 namespace input_method {
18
19 // The IBusController implementation.
20 class IBusControllerImpl : public IBusController,
21                            public IBusPanelPropertyHandlerInterface {
22  public:
23   IBusControllerImpl();
24   virtual ~IBusControllerImpl();
25
26   // IBusController overrides:
27   virtual bool ActivateInputMethodProperty(const std::string& key) OVERRIDE;
28
29   // IBusController overrides. Derived classes should not override these 4
30   // functions.
31   virtual void AddObserver(Observer* observer) OVERRIDE;
32   virtual void RemoveObserver(Observer* observer) OVERRIDE;
33   virtual const InputMethodPropertyList& GetCurrentProperties() const OVERRIDE;
34   virtual void ClearProperties() OVERRIDE;
35
36  protected:
37   ObserverList<Observer> observers_;
38
39   // The value which will be returned by GetCurrentProperties(). Derived classes
40   // should update this variable when needed.
41   InputMethodPropertyList current_property_list_;
42
43  private:
44   // IBusPanelPropertyHandlerInterface overrides:
45   virtual void RegisterProperties(
46       const InputMethodPropertyList& properties) OVERRIDE;
47
48   DISALLOW_COPY_AND_ASSIGN(IBusControllerImpl);
49 };
50
51 }  // namespace input_method
52 }  // namespace chromeos
53
54 #endif  // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_IBUS_CONTROLLER_IMPL_H_