Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(160)

Unified Diff: chromeos/dbus/ibus/ibus_panel_service.cc

Issue 11280159: Remove ibus dependency from PanelService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/chrome_tests_unit.gypi ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
« no previous file with comments | « chrome/chrome_tests_unit.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698