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_profile_manager_client.h" | 5 #include "chromeos/dbus/experimental_bluetooth_profile_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_profile_manager_client.h" | 9 #include "chromeos/dbus/fake_bluetooth_profile_manager_client.h" |
10 #include "dbus/bus.h" | 10 #include "dbus/bus.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 class ExperimentalBluetoothProfileManagerClientImpl | 34 class ExperimentalBluetoothProfileManagerClientImpl |
35 : public ExperimentalBluetoothProfileManagerClient { | 35 : public ExperimentalBluetoothProfileManagerClient { |
36 public: | 36 public: |
37 explicit ExperimentalBluetoothProfileManagerClientImpl(dbus::Bus* bus) | 37 explicit ExperimentalBluetoothProfileManagerClientImpl(dbus::Bus* bus) |
38 : bus_(bus), | 38 : bus_(bus), |
39 weak_ptr_factory_(this) { | 39 weak_ptr_factory_(this) { |
40 DCHECK(bus_); | 40 DCHECK(bus_); |
41 object_proxy_ = bus_->GetObjectProxy( | 41 object_proxy_ = bus_->GetObjectProxy( |
42 bluetooth_profile_manager::kBluetoothProfileManagerServiceName, | 42 bluetooth_profile_manager::kBluetoothProfileManagerServiceName, |
43 dbus::ObjectPath( | 43 dbus::ObjectPath( |
44 bluetooth_profile_manager::kExperimentalBluetoothProfileManagerInterface)); | 44 bluetooth_profile_manager::kBluetoothProfileManagerServicePath)); |
45 } | 45 } |
46 | 46 |
47 virtual ~ExperimentalBluetoothProfileManagerClientImpl() { | 47 virtual ~ExperimentalBluetoothProfileManagerClientImpl() { |
48 } | 48 } |
49 | 49 |
50 // ExperimentalBluetoothProfileManagerClient override. | 50 // ExperimentalBluetoothProfileManagerClient override. |
51 virtual void RegisterProfile(const dbus::ObjectPath& profile_path, | 51 virtual void RegisterProfile(const dbus::ObjectPath& profile_path, |
52 const std::string& uuid, | 52 const std::string& uuid, |
53 const Options& options, | 53 const Options& options, |
54 const base::Closure& callback, | 54 const base::Closure& callback, |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 ExperimentalBluetoothProfileManagerClient::Create( | 242 ExperimentalBluetoothProfileManagerClient::Create( |
243 DBusClientImplementationType type, | 243 DBusClientImplementationType type, |
244 dbus::Bus* bus) { | 244 dbus::Bus* bus) { |
245 if (type == REAL_DBUS_CLIENT_IMPLEMENTATION) | 245 if (type == REAL_DBUS_CLIENT_IMPLEMENTATION) |
246 return new ExperimentalBluetoothProfileManagerClientImpl(bus); | 246 return new ExperimentalBluetoothProfileManagerClientImpl(bus); |
247 DCHECK_EQ(STUB_DBUS_CLIENT_IMPLEMENTATION, type); | 247 DCHECK_EQ(STUB_DBUS_CLIENT_IMPLEMENTATION, type); |
248 return new FakeBluetoothProfileManagerClient(); | 248 return new FakeBluetoothProfileManagerClient(); |
249 } | 249 } |
250 | 250 |
251 } // namespace chromeos | 251 } // namespace chromeos |
OLD | NEW |