| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/bluetooth_le_advertising_manager_client.h" | 5 #include "device/bluetooth/dbus/bluetooth_le_advertising_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 "base/observer_list.h" | 9 #include "base/observer_list.h" |
| 10 #include "dbus/bus.h" | 10 #include "dbus/bus.h" |
| 11 #include "dbus/message.h" | 11 #include "dbus/message.h" |
| 12 #include "dbus/object_manager.h" | 12 #include "dbus/object_manager.h" |
| 13 #include "dbus/object_proxy.h" | 13 #include "dbus/object_proxy.h" |
| 14 #include "third_party/cros_system_api/dbus/service_constants.h" | 14 #include "third_party/cros_system_api/dbus/service_constants.h" |
| 15 | 15 |
| 16 namespace chromeos { | 16 namespace bluez { |
| 17 | 17 |
| 18 const char BluetoothLEAdvertisingManagerClient::kNoResponseError[] = | 18 const char BluetoothLEAdvertisingManagerClient::kNoResponseError[] = |
| 19 "org.chromium.Error.NoResponse"; | 19 "org.chromium.Error.NoResponse"; |
| 20 | 20 |
| 21 // The BluetoothAdvertisementManagerClient implementation used in production. | 21 // The BluetoothAdvertisementManagerClient implementation used in production. |
| 22 class BluetoothAdvertisementManagerClientImpl | 22 class BluetoothAdvertisementManagerClientImpl |
| 23 : public BluetoothLEAdvertisingManagerClient, | 23 : public BluetoothLEAdvertisingManagerClient, |
| 24 public dbus::ObjectManager::Interface { | 24 public dbus::ObjectManager::Interface { |
| 25 public: | 25 public: |
| 26 BluetoothAdvertisementManagerClientImpl() | 26 BluetoothAdvertisementManagerClientImpl() |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 // Weak pointer factory for generating 'this' pointers that might live longer | 168 // Weak pointer factory for generating 'this' pointers that might live longer |
| 169 // than we do. | 169 // than we do. |
| 170 // Note: This should remain the last member so it'll be destroyed and | 170 // Note: This should remain the last member so it'll be destroyed and |
| 171 // invalidate its weak pointers before any other members are destroyed. | 171 // invalidate its weak pointers before any other members are destroyed. |
| 172 base::WeakPtrFactory<BluetoothAdvertisementManagerClientImpl> | 172 base::WeakPtrFactory<BluetoothAdvertisementManagerClientImpl> |
| 173 weak_ptr_factory_; | 173 weak_ptr_factory_; |
| 174 | 174 |
| 175 DISALLOW_COPY_AND_ASSIGN(BluetoothAdvertisementManagerClientImpl); | 175 DISALLOW_COPY_AND_ASSIGN(BluetoothAdvertisementManagerClientImpl); |
| 176 }; | 176 }; |
| 177 | 177 |
| 178 BluetoothLEAdvertisingManagerClient::BluetoothLEAdvertisingManagerClient() { | 178 BluetoothLEAdvertisingManagerClient::BluetoothLEAdvertisingManagerClient() {} |
| 179 } | |
| 180 | 179 |
| 181 BluetoothLEAdvertisingManagerClient::~BluetoothLEAdvertisingManagerClient() { | 180 BluetoothLEAdvertisingManagerClient::~BluetoothLEAdvertisingManagerClient() {} |
| 182 } | |
| 183 | 181 |
| 184 BluetoothLEAdvertisingManagerClient* | 182 BluetoothLEAdvertisingManagerClient* |
| 185 BluetoothLEAdvertisingManagerClient::Create() { | 183 BluetoothLEAdvertisingManagerClient::Create() { |
| 186 return new BluetoothAdvertisementManagerClientImpl(); | 184 return new BluetoothAdvertisementManagerClientImpl(); |
| 187 } | 185 } |
| 188 | 186 |
| 189 } // namespace chromeos | 187 } // namespace bluez |
| OLD | NEW |