OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "chromeos/dbus/experimental_bluetooth_agent_manager_client.h" | 5 #include "chromeos/dbus/experimental_bluetooth_agent_manager_client.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "chromeos/dbus/fake_bluetooth_agent_manager_client.h" | 9 #include "chromeos/dbus/fake_bluetooth_agent_manager_client.h" |
10 #include "dbus/bus.h" | 10 #include "dbus/bus.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 class ExperimentalBluetoothAgentManagerClientImpl | 23 class ExperimentalBluetoothAgentManagerClientImpl |
24 : public ExperimentalBluetoothAgentManagerClient { | 24 : public ExperimentalBluetoothAgentManagerClient { |
25 public: | 25 public: |
26 explicit ExperimentalBluetoothAgentManagerClientImpl(dbus::Bus* bus) | 26 explicit ExperimentalBluetoothAgentManagerClientImpl(dbus::Bus* bus) |
27 : bus_(bus), | 27 : bus_(bus), |
28 weak_ptr_factory_(this) { | 28 weak_ptr_factory_(this) { |
29 DCHECK(bus_); | 29 DCHECK(bus_); |
30 object_proxy_ = bus_->GetObjectProxy( | 30 object_proxy_ = bus_->GetObjectProxy( |
31 bluetooth_agent_manager::kBluetoothAgentManagerServiceName, | 31 bluetooth_agent_manager::kBluetoothAgentManagerServiceName, |
32 dbus::ObjectPath( | 32 dbus::ObjectPath( |
33 bluetooth_agent_manager::kExperimentalBluetoothAgentManagerInterface)); | 33 bluetooth_agent_manager::kBluetoothAgentManagerServicePath)); |
34 } | 34 } |
35 | 35 |
36 virtual ~ExperimentalBluetoothAgentManagerClientImpl() { | 36 virtual ~ExperimentalBluetoothAgentManagerClientImpl() { |
37 } | 37 } |
38 | 38 |
39 // ExperimentalBluetoothAgentManagerClient override. | 39 // ExperimentalBluetoothAgentManagerClient override. |
40 virtual void RegisterAgent(const dbus::ObjectPath& agent_path, | 40 virtual void RegisterAgent(const dbus::ObjectPath& agent_path, |
41 const std::string& capability, | 41 const std::string& capability, |
42 const base::Closure& callback, | 42 const base::Closure& callback, |
43 const ErrorCallback& error_callback) OVERRIDE { | 43 const ErrorCallback& error_callback) OVERRIDE { |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 ExperimentalBluetoothAgentManagerClient::Create( | 150 ExperimentalBluetoothAgentManagerClient::Create( |
151 DBusClientImplementationType type, | 151 DBusClientImplementationType type, |
152 dbus::Bus* bus) { | 152 dbus::Bus* bus) { |
153 if (type == REAL_DBUS_CLIENT_IMPLEMENTATION) | 153 if (type == REAL_DBUS_CLIENT_IMPLEMENTATION) |
154 return new ExperimentalBluetoothAgentManagerClientImpl(bus); | 154 return new ExperimentalBluetoothAgentManagerClientImpl(bus); |
155 DCHECK_EQ(STUB_DBUS_CLIENT_IMPLEMENTATION, type); | 155 DCHECK_EQ(STUB_DBUS_CLIENT_IMPLEMENTATION, type); |
156 return new FakeBluetoothAgentManagerClient(); | 156 return new FakeBluetoothAgentManagerClient(); |
157 } | 157 } |
158 | 158 |
159 } // namespace chromeos | 159 } // namespace chromeos |
OLD | NEW |