OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "mojo/dbus/dbus_external_service.h" | 5 #include "mojo/dbus/dbus_external_service.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "base/message_loop/message_loop_proxy.h" | 11 #include "base/message_loop/message_loop_proxy.h" |
12 #include "dbus/bus.h" | 12 #include "dbus/bus.h" |
13 #include "dbus/exported_object.h" | 13 #include "dbus/exported_object.h" |
14 #include "dbus/file_descriptor.h" | 14 #include "dbus/file_descriptor.h" |
15 #include "dbus/message.h" | 15 #include "dbus/message.h" |
16 #include "dbus/object_path.h" | 16 #include "dbus/object_path.h" |
17 #include "mojo/common/channel_init.h" | 17 #include "mojo/common/channel_init.h" |
| 18 #include "mojo/public/cpp/application/application.h" |
18 #include "mojo/public/cpp/bindings/error_handler.h" | 19 #include "mojo/public/cpp/bindings/error_handler.h" |
19 #include "mojo/public/cpp/shell/application.h" | 20 #include "mojo/public/interfaces/service_provider/service_provider.mojom.h" |
20 #include "mojo/public/interfaces/shell/shell.mojom.h" | |
21 #include "mojo/shell/external_service.mojom.h" | 21 #include "mojo/shell/external_service.mojom.h" |
22 | 22 |
23 namespace mojo { | 23 namespace mojo { |
24 | 24 |
25 DBusExternalServiceBase::DBusExternalServiceBase( | 25 DBusExternalServiceBase::DBusExternalServiceBase( |
26 const std::string& service_name) | 26 const std::string& service_name) |
27 : service_name_(service_name), | 27 : service_name_(service_name), |
28 exported_object_(NULL) { | 28 exported_object_(NULL) { |
29 } | 29 } |
30 DBusExternalServiceBase::~DBusExternalServiceBase() {} | 30 DBusExternalServiceBase::~DBusExternalServiceBase() {} |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 } | 81 } |
82 | 82 |
83 void DBusExternalServiceBase::TakeDBusServiceOwnership() { | 83 void DBusExternalServiceBase::TakeDBusServiceOwnership() { |
84 CHECK(bus_->RequestOwnershipAndBlock( | 84 CHECK(bus_->RequestOwnershipAndBlock( |
85 service_name_, | 85 service_name_, |
86 dbus::Bus::REQUIRE_PRIMARY_ALLOW_REPLACEMENT)) | 86 dbus::Bus::REQUIRE_PRIMARY_ALLOW_REPLACEMENT)) |
87 << "Unable to take ownership of " << service_name_; | 87 << "Unable to take ownership of " << service_name_; |
88 } | 88 } |
89 | 89 |
90 } // namespace mojo | 90 } // namespace mojo |
OLD | NEW |