| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_WIN_H_ | 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_WIN_H_ |
| 6 #define DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_WIN_H_ | 6 #define DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_WIN_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/containers/hash_tables.h" | 12 #include "base/containers/hash_tables.h" |
| 13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
| 14 #include "base/memory/scoped_vector.h" | 14 #include "base/memory/scoped_vector.h" |
| 15 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.h" |
| 16 #include "base/threading/thread_checker.h" | 16 #include "base/threading/thread_checker.h" |
| 17 #include "device/bluetooth/bluetooth_adapter.h" | 17 #include "device/bluetooth/bluetooth_adapter.h" |
| 18 #include "device/bluetooth/bluetooth_export.h" | |
| 19 #include "device/bluetooth/bluetooth_task_manager_win.h" | 18 #include "device/bluetooth/bluetooth_task_manager_win.h" |
| 20 | 19 |
| 21 namespace base { | 20 namespace base { |
| 22 class SequencedTaskRunner; | 21 class SequencedTaskRunner; |
| 23 class Thread; | 22 class Thread; |
| 24 } // namespace base | 23 } // namespace base |
| 25 | 24 |
| 26 namespace device { | 25 namespace device { |
| 27 | 26 |
| 28 class BluetoothAdapterWinTest; | 27 class BluetoothAdapterWinTest; |
| 29 class BluetoothDevice; | 28 class BluetoothDevice; |
| 30 class BluetoothSocketThread; | 29 class BluetoothSocketThread; |
| 31 | 30 |
| 32 class DEVICE_BLUETOOTH_EXPORT BluetoothAdapterWin | 31 class BluetoothAdapterWin : public BluetoothAdapter, |
| 33 : public BluetoothAdapter, | 32 public BluetoothTaskManagerWin::Observer { |
| 34 public BluetoothTaskManagerWin::Observer { | |
| 35 public: | 33 public: |
| 36 static base::WeakPtr<BluetoothAdapter> CreateAdapter( | 34 static base::WeakPtr<BluetoothAdapter> CreateAdapter( |
| 37 const InitCallback& init_callback); | 35 const InitCallback& init_callback); |
| 38 | 36 |
| 39 // BluetoothAdapter: | 37 // BluetoothAdapter: |
| 40 virtual void AddObserver(BluetoothAdapter::Observer* observer) override; | 38 virtual void AddObserver(BluetoothAdapter::Observer* observer) override; |
| 41 virtual void RemoveObserver(BluetoothAdapter::Observer* observer) override; | 39 virtual void RemoveObserver(BluetoothAdapter::Observer* observer) override; |
| 42 virtual std::string GetAddress() const override; | 40 virtual std::string GetAddress() const override; |
| 43 virtual std::string GetName() const override; | 41 virtual std::string GetName() const override; |
| 44 virtual void SetName(const std::string& name, | 42 virtual void SetName(const std::string& name, |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 // NOTE: This should remain the last member so it'll be destroyed and | 140 // NOTE: This should remain the last member so it'll be destroyed and |
| 143 // invalidate its weak pointers before any other members are destroyed. | 141 // invalidate its weak pointers before any other members are destroyed. |
| 144 base::WeakPtrFactory<BluetoothAdapterWin> weak_ptr_factory_; | 142 base::WeakPtrFactory<BluetoothAdapterWin> weak_ptr_factory_; |
| 145 | 143 |
| 146 DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterWin); | 144 DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterWin); |
| 147 }; | 145 }; |
| 148 | 146 |
| 149 } // namespace device | 147 } // namespace device |
| 150 | 148 |
| 151 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_WIN_H_ | 149 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_WIN_H_ |
| OLD | NEW |