| 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 "device/bluetooth/dbus/bluetooth_gatt_descriptor_client.h" | 5 #include "device/bluetooth/dbus/bluetooth_gatt_descriptor_client.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/memory/weak_ptr.h" | 8 #include "base/memory/weak_ptr.h" |
| 9 #include "base/observer_list.h" | 9 #include "base/observer_list.h" |
| 10 #include "dbus/bus.h" | 10 #include "dbus/bus.h" |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 | 152 |
| 153 // dbus::ObjectManager::Interface override. | 153 // dbus::ObjectManager::Interface override. |
| 154 void ObjectRemoved(const dbus::ObjectPath& object_path, | 154 void ObjectRemoved(const dbus::ObjectPath& object_path, |
| 155 const std::string& interface_name) override { | 155 const std::string& interface_name) override { |
| 156 VLOG(2) << "Remote GATT descriptor removed: " << object_path.value(); | 156 VLOG(2) << "Remote GATT descriptor removed: " << object_path.value(); |
| 157 FOR_EACH_OBSERVER(BluetoothGattDescriptorClient::Observer, observers_, | 157 FOR_EACH_OBSERVER(BluetoothGattDescriptorClient::Observer, observers_, |
| 158 GattDescriptorRemoved(object_path)); | 158 GattDescriptorRemoved(object_path)); |
| 159 } | 159 } |
| 160 | 160 |
| 161 protected: | 161 protected: |
| 162 // chromeos::DBusClient override. | 162 // bluez::DBusClient override. |
| 163 void Init(dbus::Bus* bus) override { | 163 void Init(dbus::Bus* bus) override { |
| 164 object_manager_ = bus->GetObjectManager( | 164 object_manager_ = bus->GetObjectManager( |
| 165 bluetooth_object_manager::kBluetoothObjectManagerServiceName, | 165 bluetooth_object_manager::kBluetoothObjectManagerServiceName, |
| 166 dbus::ObjectPath( | 166 dbus::ObjectPath( |
| 167 bluetooth_object_manager::kBluetoothObjectManagerServicePath)); | 167 bluetooth_object_manager::kBluetoothObjectManagerServicePath)); |
| 168 object_manager_->RegisterInterface( | 168 object_manager_->RegisterInterface( |
| 169 bluetooth_gatt_descriptor::kBluetoothGattDescriptorInterface, this); | 169 bluetooth_gatt_descriptor::kBluetoothGattDescriptorInterface, this); |
| 170 } | 170 } |
| 171 | 171 |
| 172 private: | 172 private: |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 BluetoothGattDescriptorClient::BluetoothGattDescriptorClient() {} | 242 BluetoothGattDescriptorClient::BluetoothGattDescriptorClient() {} |
| 243 | 243 |
| 244 BluetoothGattDescriptorClient::~BluetoothGattDescriptorClient() {} | 244 BluetoothGattDescriptorClient::~BluetoothGattDescriptorClient() {} |
| 245 | 245 |
| 246 // static | 246 // static |
| 247 BluetoothGattDescriptorClient* BluetoothGattDescriptorClient::Create() { | 247 BluetoothGattDescriptorClient* BluetoothGattDescriptorClient::Create() { |
| 248 return new BluetoothGattDescriptorClientImpl(); | 248 return new BluetoothGattDescriptorClientImpl(); |
| 249 } | 249 } |
| 250 | 250 |
| 251 } // namespace bluez | 251 } // namespace bluez |
| OLD | NEW |