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_IBUS_CONTROLLER_IMPL_H_
6 #define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_IBUS_CONTROLLER_IMPL_H_
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"
17 namespace input_method {
19 // The IBusController implementation.
20 class IBusControllerImpl : public IBusController,
21 public IBusPanelPropertyHandlerInterface {
24 virtual ~IBusControllerImpl();
26 // IBusController overrides:
27 virtual bool ActivateInputMethodProperty(const std::string& key) OVERRIDE;
29 // IBusController overrides. Derived classes should not override these 4
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;
37 ObserverList<Observer> observers_;
39 // The value which will be returned by GetCurrentProperties(). Derived classes
40 // should update this variable when needed.
41 InputMethodPropertyList current_property_list_;
44 // IBusPanelPropertyHandlerInterface overrides:
45 virtual void RegisterProperties(
46 const InputMethodPropertyList& properties) OVERRIDE;
48 DISALLOW_COPY_AND_ASSIGN(IBusControllerImpl);
51 } // namespace input_method
52 } // namespace chromeos
54 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_IBUS_CONTROLLER_IMPL_H_