Chromium Code Reviews| Index: chrome/browser/chromeos/input_method/ibus_controller_impl.h |
| diff --git a/chrome/browser/chromeos/input_method/ibus_controller_impl.h b/chrome/browser/chromeos/input_method/ibus_controller_impl.h |
| index 97de94269287b74c069f11cafb0199567b7852c4..53a51c21d920b904c9745a05860df8f21bbbcbc0 100644 |
| --- a/chrome/browser/chromeos/input_method/ibus_controller_impl.h |
| +++ b/chrome/browser/chromeos/input_method/ibus_controller_impl.h |
| @@ -60,7 +60,17 @@ class IBusControllerImpl : public IBusControllerBase { |
| const InputMethodProperty& new_prop, |
| InputMethodPropertyList* prop_list); |
| + // Called after the connection to ibus-daemon is established. |
| + void IBusDaemonInitializationDone(); |
| + |
| private: |
| + enum IBusDaemonStatus{ |
| + IBUS_DAEMON_INITIALIZING, |
| + IBUS_DAEMON_RUNNING, |
| + IBUS_DAEMON_SHUTTING_DOWN, |
| + IBUS_DAEMON_STOP, |
| + }; |
| + |
| // Functions that end with Thunk are used to deal with glib callbacks. |
| CHROMEG_CALLBACK_0(IBusControllerImpl, void, BusConnected, IBusBus*); |
| CHROMEG_CALLBACK_0(IBusControllerImpl, void, BusDisconnected, IBusBus*); |
| @@ -111,9 +121,11 @@ class IBusControllerImpl : public IBusControllerBase { |
| // "update-property" D-Bus signals from ibus-daemon. |
| void ConnectPanelServiceSignals(); |
| - // Starts ibus-daemon if it's not yet started and |should_launch_daemon_| is |
| - // true. |
| - bool MaybeLaunchIBusDaemon(); |
| + // Adds address file watcher in FILE thread and then calls LaunchIBusDaemon. |
| + bool StartIBusDaemon(); |
| + |
| + // Starts ibus-daemon. |
| + void LaunchIBusDaemon(const std::string& ibus_address); |
| // Launches an input method procsess specified by the given command |
| // line. On success, returns true and stores the process handle in |
| @@ -140,9 +152,6 @@ class IBusControllerImpl : public IBusControllerBase { |
| IBusBus* ibus_; |
| IBusConfig* ibus_config_; |
| - // true when ibus-daemon should be running. |
| - bool should_launch_daemon_; |
| - |
| // The process handle of the IBus daemon. kNullProcessHandle if it's not |
| // running. |
| base::ProcessHandle process_handle_; |
| @@ -157,6 +166,15 @@ class IBusControllerImpl : public IBusControllerBase { |
| // An object which knows all valid input methods and layout IDs. |
| InputMethodWhitelist whitelist_; |
| + // Represents ibus-daemon's status. |
| + IBusDaemonStatus ibus_daemon_status_; |
| + |
| + // The retry count if the ibus-daemon is crashed in initializing step. |
| + int ibus_launch_retry_count_; |
|
Yusuke Sato
2012/05/01 07:06:55
Wouldn't it be possible not to add this variable f
Seigo Nonaka
2012/05/02 05:12:10
Okay, I removed this variable.
On 2012/05/01 07:06
|
| + |
| + // Used for making callbacks for PostTask. |
| + base::WeakPtrFactory<IBusControllerImpl> weak_ptr_factory_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(IBusControllerImpl); |
| }; |