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

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

Issue 229463003: MacOS implementation of BluetoothSocket. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix build error on OSX SDK < 10.7. Created 6 years, 8 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
« no previous file with comments | « device/bluetooth/bluetooth_adapter_mac.mm ('k') | device/bluetooth/bluetooth_device_mac.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_DEVICE_MAC_H_ 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_MAC_H_
6 #define DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_MAC_H_ 6 #define DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_MAC_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/observer_list.h" 11 #include "base/observer_list.h"
12 #include "device/bluetooth/bluetooth_device.h" 12 #include "device/bluetooth/bluetooth_device.h"
13 13
14 #ifdef __OBJC__ 14 #ifdef __OBJC__
15 @class IOBluetoothDevice; 15 @class IOBluetoothDevice;
16 #else 16 #else
17 class IOBluetoothDevice; 17 class IOBluetoothDevice;
18 #endif 18 #endif
19 19
20 namespace base {
21 class SequencedTaskRunner;
22 } // namespace base
23
20 namespace device { 24 namespace device {
21 25
22 class BluetoothDeviceMac : public BluetoothDevice { 26 class BluetoothDeviceMac : public BluetoothDevice {
23 public: 27 public:
24 explicit BluetoothDeviceMac(IOBluetoothDevice* device); 28 explicit BluetoothDeviceMac(
29 const scoped_refptr<base::SequencedTaskRunner>& ui_task_runner,
30 IOBluetoothDevice* device);
25 virtual ~BluetoothDeviceMac(); 31 virtual ~BluetoothDeviceMac();
26 32
27 // BluetoothDevice override 33 // BluetoothDevice override
28 virtual void AddObserver( 34 virtual void AddObserver(
29 device::BluetoothDevice::Observer* observer) OVERRIDE; 35 device::BluetoothDevice::Observer* observer) OVERRIDE;
30 virtual void RemoveObserver( 36 virtual void RemoveObserver(
31 device::BluetoothDevice::Observer* observer) OVERRIDE; 37 device::BluetoothDevice::Observer* observer) OVERRIDE;
32 virtual uint32 GetBluetoothClass() const OVERRIDE; 38 virtual uint32 GetBluetoothClass() const OVERRIDE;
33 virtual std::string GetAddress() const OVERRIDE; 39 virtual std::string GetAddress() const OVERRIDE;
34 virtual VendorIDSource GetVendorIDSource() const OVERRIDE; 40 virtual VendorIDSource GetVendorIDSource() const OVERRIDE;
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 protected: 80 protected:
75 // BluetoothDevice override 81 // BluetoothDevice override
76 virtual std::string GetDeviceName() const OVERRIDE; 82 virtual std::string GetDeviceName() const OVERRIDE;
77 83
78 private: 84 private:
79 friend class BluetoothAdapterMac; 85 friend class BluetoothAdapterMac;
80 86
81 // List of observers interested in event notifications from us. 87 // List of observers interested in event notifications from us.
82 ObserverList<Observer> observers_; 88 ObserverList<Observer> observers_;
83 89
90 scoped_refptr<base::SequencedTaskRunner> ui_task_runner_;
91 // (retained)
84 IOBluetoothDevice* device_; 92 IOBluetoothDevice* device_;
85 93
86 DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceMac); 94 DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceMac);
87 }; 95 };
88 96
89 } // namespace device 97 } // namespace device
90 98
91 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_MAC_H_ 99 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_MAC_H_
OLDNEW
« no previous file with comments | « device/bluetooth/bluetooth_adapter_mac.mm ('k') | device/bluetooth/bluetooth_device_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698