Chromium Code Reviews| Index: chromeos/dbus/dbus_thread_manager.cc |
| diff --git a/chromeos/dbus/dbus_thread_manager.cc b/chromeos/dbus/dbus_thread_manager.cc |
| index 421c2cb0febeee93f0ed10a7d1df680c93204659..832f0ff0017d20ab59d7dcb5ee060d320b3e9d08 100644 |
| --- a/chromeos/dbus/dbus_thread_manager.cc |
| +++ b/chromeos/dbus/dbus_thread_manager.cc |
| @@ -5,6 +5,7 @@ |
| #include "chromeos/dbus/dbus_thread_manager.h" |
| #include "base/chromeos/chromeos_version.h" |
| +#include "base/environment.h" |
| #include "base/threading/thread.h" |
| #include "chromeos/dbus/bluetooth_adapter_client.h" |
| #include "chromeos/dbus/bluetooth_device_client.h" |
| @@ -131,11 +132,32 @@ class DBusThreadManagerImpl : public DBusThreadManager { |
| } |
| // DBusThreadManager override. |
| + virtual void InitializeIBusBus(const std::string &ibus_address) OVERRIDE { |
| + if (ibus_bus_) { |
| + LOG(WARNING) << "The IBusBus was already initialized."; |
| + return; |
| + } |
| + dbus::Bus::Options ibus_bus_options; |
| + ibus_bus_options.bus_type = dbus::Bus::CUSTOM_ADDRESS; |
| + ibus_bus_options.address = ibus_address; |
| + ibus_bus_options.connection_type = dbus::Bus::PRIVATE; |
| + ibus_bus_options.dbus_thread_message_loop_proxy = |
| + dbus_thread_->message_loop_proxy(); |
| + ibus_bus_ = new dbus::Bus(ibus_bus_options); |
|
Yusuke Sato
2012/04/24 04:58:37
This line could be executed before ibus-daemon act
Seigo Nonaka
2012/04/26 00:14:32
Thank you for your kindly notification.
I introdu
|
| + VLOG(1) << "Connected to ibus-daemon.(address:" << ibus_address << ")"; |
| + } |
| + |
| + // DBusThreadManager override. |
| virtual dbus::Bus* GetSystemBus() OVERRIDE { |
| return system_bus_.get(); |
| } |
| // DBusThreadManager override. |
| + virtual dbus::Bus* GetIBusBus() OVERRIDE { |
| + return ibus_bus_.get(); |
| + } |
| + |
| + // DBusThreadManager override. |
| virtual BluetoothAdapterClient* GetBluetoothAdapterClient() OVERRIDE { |
| return bluetooth_adapter_client_.get(); |
| } |
| @@ -247,6 +269,7 @@ class DBusThreadManagerImpl : public DBusThreadManager { |
| scoped_ptr<base::Thread> dbus_thread_; |
| scoped_refptr<dbus::Bus> system_bus_; |
| + scoped_refptr<dbus::Bus> ibus_bus_; |
| scoped_ptr<BluetoothAdapterClient> bluetooth_adapter_client_; |
| scoped_ptr<BluetoothDeviceClient> bluetooth_device_client_; |
| scoped_ptr<BluetoothInputClient> bluetooth_input_client_; |