| Index: chromeos/dbus/ibus/ibus_panel_service.cc
|
| diff --git a/chromeos/dbus/ibus/ibus_panel_service.cc b/chromeos/dbus/ibus/ibus_panel_service.cc
|
| index 15f7db36d7a2cc836a3155457e68b3d7c289a32c..28224c18cddbe147ae37e02ad700a7eebc1879f6 100644
|
| --- a/chromeos/dbus/ibus/ibus_panel_service.cc
|
| +++ b/chromeos/dbus/ibus/ibus_panel_service.cc
|
| @@ -94,6 +94,12 @@ class IBusPanelServiceImpl : public IBusPanelService {
|
| weak_ptr_factory_.GetWeakPtr()),
|
| base::Bind(&IBusPanelServiceImpl::OnMethodExported,
|
| weak_ptr_factory_.GetWeakPtr()));
|
| +
|
| + // Request well known name to ibus-daemon.
|
| + bus->RequestOwnership(
|
| + ibus::panel::kServiceName,
|
| + base::Bind(&IBusPanelServiceImpl::OnRequestOwnership,
|
| + weak_ptr_factory_.GetWeakPtr()));
|
| }
|
|
|
| virtual ~IBusPanelServiceImpl() {
|
| @@ -316,6 +322,12 @@ class IBusPanelServiceImpl : public IBusPanelService {
|
| << interface_name << "." << method_name;
|
| }
|
|
|
| + // Called when the well knwon name is acquired.
|
| + void OnRequestOwnership(const std::string& name, bool obtained) {
|
| + LOG_IF(ERROR, !obtained) << "Failed to acquire well known name:"
|
| + << name;
|
| + }
|
| +
|
| // D-Bus bus object used for unregistering exported methods in dtor.
|
| dbus::Bus* bus_;
|
|
|
|
|