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

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

Issue 12929003: Implemented BluetoothAdapterMac::AddDevices(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 9 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
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"
11 #include "base/memory/weak_ptr.h" 11 #include "base/memory/weak_ptr.h"
12 #include "base/observer_list.h" 12 #include "base/observer_list.h"
13 #include "device/bluetooth/bluetooth_adapter.h" 13 #include "device/bluetooth/bluetooth_adapter.h"
14 14
15 #ifdef __OBJC__
16 @class NSArray;
17 #else
18 class NSArray;
19 #endif
20
15 namespace base { 21 namespace base {
16 22
17 class SequencedTaskRunner; 23 class SequencedTaskRunner;
18 24
19 } // namespace base 25 } // namespace base
20 26
21 namespace device { 27 namespace device {
22 28
23 class BluetoothAdapterMacTest; 29 class BluetoothAdapterMacTest;
24 30
(...skipping 27 matching lines...) Expand all
52 friend class BluetoothAdapterMacTest; 58 friend class BluetoothAdapterMacTest;
53 59
54 BluetoothAdapterMac(); 60 BluetoothAdapterMac();
55 virtual ~BluetoothAdapterMac(); 61 virtual ~BluetoothAdapterMac();
56 62
57 void TrackDefaultAdapter(); 63 void TrackDefaultAdapter();
58 void TrackTestAdapter( 64 void TrackTestAdapter(
59 scoped_refptr<base::SequencedTaskRunner> ui_task_runner); 65 scoped_refptr<base::SequencedTaskRunner> ui_task_runner);
60 void PollAdapter(); 66 void PollAdapter();
61 67
68 // Updates |devices_| to be consistent with |devices| and fires |DeviceAdded|,
69 // |DeviceChanged|, and |DeviceRemoved| observer calls.
Mark Mentovai 2013/03/19 16:04:35 This comment should explain what |devices| is, bec
youngki 2013/03/19 19:04:55 Done.
70 void UpdateDevices(NSArray* devices);
71
62 bool powered_; 72 bool powered_;
63 73
64 scoped_refptr<base::SequencedTaskRunner> ui_task_runner_; 74 scoped_refptr<base::SequencedTaskRunner> ui_task_runner_;
65 75
66 // List of observers interested in event notifications from us. 76 // List of observers interested in event notifications from us.
67 ObserverList<BluetoothAdapter::Observer> observers_; 77 ObserverList<BluetoothAdapter::Observer> observers_;
68 78
69 base::WeakPtrFactory<BluetoothAdapterMac> weak_ptr_factory_; 79 base::WeakPtrFactory<BluetoothAdapterMac> weak_ptr_factory_;
70 80
71 DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterMac); 81 DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterMac);
72 }; 82 };
73 83
74 } // namespace device 84 } // namespace device
75 85
76 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_MAC_H_ 86 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698