| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_CHROMEOS_INPUT_METHOD_IBUS_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_INPUT_METHOD_IBUS_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_IBUS_CONTROLLER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_IBUS_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 namespace chromeos { | 12 namespace chromeos { |
| 13 namespace input_method { | 13 namespace input_method { |
| 14 | 14 |
| 15 struct InputMethodConfigValue; | 15 struct InputMethodConfigValue; |
| 16 struct InputMethodProperty; | 16 struct InputMethodProperty; |
| 17 typedef std::vector<InputMethodProperty> InputMethodPropertyList; | 17 typedef std::vector<InputMethodProperty> InputMethodPropertyList; |
| 18 | 18 |
| 19 // IBusController is used to interact with the system input method framework | 19 // IBusController is used to interact with the system input method framework |
| 20 // (which is currently IBus). | 20 // (which is currently IBus). |
| 21 class IBusController { | 21 class IBusController { |
| 22 public: | 22 public: |
| 23 class Observer { | 23 class Observer { |
| 24 public: | 24 public: |
| 25 virtual ~Observer() {} | 25 virtual ~Observer() {} |
| 26 virtual void PropertyChanged() = 0; | 26 virtual void PropertyChanged() = 0; |
| 27 virtual void OnConnected() = 0; |
| 28 virtual void OnDisconnected() = 0; |
| 27 // TODO(yusukes): Add functions for IPC error handling. | 29 // TODO(yusukes): Add functions for IPC error handling. |
| 28 }; | 30 }; |
| 29 | 31 |
| 30 // Creates an instance of the class. | 32 // Creates an instance of the class. |
| 31 static IBusController* Create(); | 33 static IBusController* Create(); |
| 32 | 34 |
| 33 virtual ~IBusController(); | 35 virtual ~IBusController(); |
| 34 | 36 |
| 35 virtual void AddObserver(Observer* observer) = 0; | 37 virtual void AddObserver(Observer* observer) = 0; |
| 36 virtual void RemoveObserver(Observer* observer) = 0; | 38 virtual void RemoveObserver(Observer* observer) = 0; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 66 virtual const InputMethodPropertyList& GetCurrentProperties() const = 0; | 68 virtual const InputMethodPropertyList& GetCurrentProperties() const = 0; |
| 67 }; | 69 }; |
| 68 | 70 |
| 69 } // namespace input_method | 71 } // namespace input_method |
| 70 } // namespace chromeos | 72 } // namespace chromeos |
| 71 | 73 |
| 72 // TODO(yusukes,nona): This interface does not depend on IBus actually. | 74 // TODO(yusukes,nona): This interface does not depend on IBus actually. |
| 73 // Rename the file if needed. | 75 // Rename the file if needed. |
| 74 | 76 |
| 75 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_IBUS_CONTROLLER_H_ | 77 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_IBUS_CONTROLLER_H_ |
| OLD | NEW |