Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(419)

Side by Side Diff: device/bluetooth/bluetooth_adapter_chromeos.h

Issue 267633003: Reimplement BluetoothSocketChromeOS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_CHROMEOS_H_ 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_CHROMEOS_H_
6 #define DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_CHROMEOS_H_ 6 #define DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_CHROMEOS_H_
7 7
8 #include <queue> 8 #include <queue>
9 #include <string> 9 #include <string>
10 10
11 #include "base/memory/weak_ptr.h" 11 #include "base/memory/weak_ptr.h"
12 #include "base/sequenced_task_runner.h"
12 #include "chromeos/dbus/bluetooth_adapter_client.h" 13 #include "chromeos/dbus/bluetooth_adapter_client.h"
13 #include "chromeos/dbus/bluetooth_agent_service_provider.h" 14 #include "chromeos/dbus/bluetooth_agent_service_provider.h"
14 #include "chromeos/dbus/bluetooth_device_client.h" 15 #include "chromeos/dbus/bluetooth_device_client.h"
15 #include "chromeos/dbus/bluetooth_input_client.h" 16 #include "chromeos/dbus/bluetooth_input_client.h"
16 #include "dbus/object_path.h" 17 #include "dbus/object_path.h"
17 #include "device/bluetooth/bluetooth_adapter.h" 18 #include "device/bluetooth/bluetooth_adapter.h"
18 #include "device/bluetooth/bluetooth_device.h" 19 #include "device/bluetooth/bluetooth_device.h"
19 20
21 namespace device {
22 class BluetoothSocketThread;
23 } // namespace device
24
20 namespace chromeos { 25 namespace chromeos {
21 26
22 class BluetoothChromeOSTest; 27 class BluetoothChromeOSTest;
23 class BluetoothDeviceChromeOS; 28 class BluetoothDeviceChromeOS;
24 class BluetoothPairingChromeOS; 29 class BluetoothPairingChromeOS;
25 30
26 // The BluetoothAdapterChromeOS class implements BluetoothAdapter for the 31 // The BluetoothAdapterChromeOS class implements BluetoothAdapter for the
27 // Chrome OS platform. 32 // Chrome OS platform.
28 class BluetoothAdapterChromeOS 33 class BluetoothAdapterChromeOS
29 : public device::BluetoothAdapter, 34 : public device::BluetoothAdapter,
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 // Object path of the adapter we track. 228 // Object path of the adapter we track.
224 dbus::ObjectPath object_path_; 229 dbus::ObjectPath object_path_;
225 230
226 // List of observers interested in event notifications from us. 231 // List of observers interested in event notifications from us.
227 ObserverList<device::BluetoothAdapter::Observer> observers_; 232 ObserverList<device::BluetoothAdapter::Observer> observers_;
228 233
229 // Instance of the D-Bus agent object used for pairing, initialized with 234 // Instance of the D-Bus agent object used for pairing, initialized with
230 // our own class as its delegate. 235 // our own class as its delegate.
231 scoped_ptr<BluetoothAgentServiceProvider> agent_; 236 scoped_ptr<BluetoothAgentServiceProvider> agent_;
232 237
238 // UI thread task runner and socket thread object used to create sockets.
239 scoped_refptr<base::SequencedTaskRunner> ui_task_runner_;
240 scoped_refptr<device::BluetoothSocketThread> socket_thread_;
241
233 // Note: This should remain the last member so it'll be destroyed and 242 // Note: This should remain the last member so it'll be destroyed and
234 // invalidate its weak pointers before any other members are destroyed. 243 // invalidate its weak pointers before any other members are destroyed.
235 base::WeakPtrFactory<BluetoothAdapterChromeOS> weak_ptr_factory_; 244 base::WeakPtrFactory<BluetoothAdapterChromeOS> weak_ptr_factory_;
236 245
237 DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterChromeOS); 246 DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterChromeOS);
238 }; 247 };
239 248
240 } // namespace chromeos 249 } // namespace chromeos
241 250
242 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_CHROMEOS_H_ 251 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_CHROMEOS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698