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

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

Issue 13224004: Bluetooth: remove private members from BluetoothAdapter (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review comments Created 7 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
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_MAC_H_ 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_MAC_H_
6 #define DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_MAC_H_ 6 #define DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_MAC_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 15 matching lines...) Expand all
26 26
27 namespace device { 27 namespace device {
28 28
29 class BluetoothAdapterMacTest; 29 class BluetoothAdapterMacTest;
30 30
31 class BluetoothAdapterMac : public BluetoothAdapter { 31 class BluetoothAdapterMac : public BluetoothAdapter {
32 public: 32 public:
33 // BluetoothAdapter override 33 // BluetoothAdapter override
34 virtual void AddObserver(BluetoothAdapter::Observer* observer) OVERRIDE; 34 virtual void AddObserver(BluetoothAdapter::Observer* observer) OVERRIDE;
35 virtual void RemoveObserver(BluetoothAdapter::Observer* observer) OVERRIDE; 35 virtual void RemoveObserver(BluetoothAdapter::Observer* observer) OVERRIDE;
36 virtual std::string address() const OVERRIDE;
37 virtual std::string name() const OVERRIDE;
36 virtual bool IsInitialized() const OVERRIDE; 38 virtual bool IsInitialized() const OVERRIDE;
37 virtual bool IsPresent() const OVERRIDE; 39 virtual bool IsPresent() const OVERRIDE;
38 virtual bool IsPowered() const OVERRIDE; 40 virtual bool IsPowered() const OVERRIDE;
39 virtual void SetPowered( 41 virtual void SetPowered(
40 bool powered, 42 bool powered,
41 const base::Closure& callback, 43 const base::Closure& callback,
42 const ErrorCallback& error_callback) OVERRIDE; 44 const ErrorCallback& error_callback) OVERRIDE;
43 virtual bool IsDiscovering() const OVERRIDE; 45 virtual bool IsDiscovering() const OVERRIDE;
44 46
45 virtual void StartDiscovering( 47 virtual void StartDiscovering(
(...skipping 20 matching lines...) Expand all
66 // Adds |devices| into |devices_| and notifies observers of the changes. 68 // Adds |devices| into |devices_| and notifies observers of the changes.
67 // |devices| is an array of pointers to discovered or paired 69 // |devices| is an array of pointers to discovered or paired
68 // |IOBluetoothDevice| objects. 70 // |IOBluetoothDevice| objects.
69 void AddDevices(NSArray* devices); 71 void AddDevices(NSArray* devices);
70 72
71 // Removes devices that used to be paired but are unpaired by the system from 73 // Removes devices that used to be paired but are unpaired by the system from
72 // |devices_|. 74 // |devices_|.
73 // |devices| is an array of pointers to paired |IOBluetoothDevice| objects. 75 // |devices| is an array of pointers to paired |IOBluetoothDevice| objects.
74 void RemoveUnpairedDevices(NSArray* paired_devices); 76 void RemoveUnpairedDevices(NSArray* paired_devices);
75 77
78 std::string address_;
79 std::string name_;
76 bool powered_; 80 bool powered_;
77 81
78 scoped_refptr<base::SequencedTaskRunner> ui_task_runner_; 82 scoped_refptr<base::SequencedTaskRunner> ui_task_runner_;
79 83
80 // List of observers interested in event notifications from us. 84 // List of observers interested in event notifications from us.
81 ObserverList<BluetoothAdapter::Observer> observers_; 85 ObserverList<BluetoothAdapter::Observer> observers_;
82 86
83 base::WeakPtrFactory<BluetoothAdapterMac> weak_ptr_factory_; 87 base::WeakPtrFactory<BluetoothAdapterMac> weak_ptr_factory_;
84 88
85 DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterMac); 89 DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterMac);
86 }; 90 };
87 91
88 } // namespace device 92 } // namespace device
89 93
90 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_MAC_H_ 94 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_MAC_H_
OLDNEW
« no previous file with comments | « device/bluetooth/bluetooth_adapter_chromeos_experimental.cc ('k') | device/bluetooth/bluetooth_adapter_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698