| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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/bluetooth_adapter_client.h" | 5 #include "chromeos/dbus/bluetooth_adapter_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 "dbus/bus.h" | 9 #include "dbus/bus.h" |
| 10 #include "dbus/message.h" | 10 #include "dbus/message.h" |
| (...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 337 } else { | 337 } else { |
| 338 error_name = kNoResponseError; | 338 error_name = kNoResponseError; |
| 339 error_message = ""; | 339 error_message = ""; |
| 340 } | 340 } |
| 341 error_callback.Run(error_name, error_message); | 341 error_callback.Run(error_name, error_message); |
| 342 } | 342 } |
| 343 | 343 |
| 344 dbus::ObjectManager* object_manager_; | 344 dbus::ObjectManager* object_manager_; |
| 345 | 345 |
| 346 // List of observers interested in event notifications from us. | 346 // List of observers interested in event notifications from us. |
| 347 ObserverList<BluetoothAdapterClient::Observer> observers_; | 347 base::ObserverList<BluetoothAdapterClient::Observer> observers_; |
| 348 | 348 |
| 349 // Weak pointer factory for generating 'this' pointers that might live longer | 349 // Weak pointer factory for generating 'this' pointers that might live longer |
| 350 // than we do. | 350 // than we do. |
| 351 // Note: This should remain the last member so it'll be destroyed and | 351 // Note: This should remain the last member so it'll be destroyed and |
| 352 // invalidate its weak pointers before any other members are destroyed. | 352 // invalidate its weak pointers before any other members are destroyed. |
| 353 base::WeakPtrFactory<BluetoothAdapterClientImpl> | 353 base::WeakPtrFactory<BluetoothAdapterClientImpl> |
| 354 weak_ptr_factory_; | 354 weak_ptr_factory_; |
| 355 | 355 |
| 356 DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterClientImpl); | 356 DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterClientImpl); |
| 357 }; | 357 }; |
| 358 | 358 |
| 359 BluetoothAdapterClient::BluetoothAdapterClient() { | 359 BluetoothAdapterClient::BluetoothAdapterClient() { |
| 360 } | 360 } |
| 361 | 361 |
| 362 BluetoothAdapterClient::~BluetoothAdapterClient() { | 362 BluetoothAdapterClient::~BluetoothAdapterClient() { |
| 363 } | 363 } |
| 364 | 364 |
| 365 BluetoothAdapterClient* BluetoothAdapterClient::Create() { | 365 BluetoothAdapterClient* BluetoothAdapterClient::Create() { |
| 366 return new BluetoothAdapterClientImpl; | 366 return new BluetoothAdapterClientImpl; |
| 367 } | 367 } |
| 368 | 368 |
| 369 } // namespace chromeos | 369 } // namespace chromeos |
| OLD | NEW |