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

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

Issue 1367663002: Add Linux support for the Bluetooth API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@refactor_dbus
Patch Set: rebase Created 5 years, 2 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
« no previous file with comments | « device/bluetooth/bluetooth.gyp ('k') | device/bluetooth/bluetooth_adapter.cc » ('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 (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_H_ 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_H_
6 #define DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_H_ 6 #define DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_H_
7 7
8 #include <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 // asynchronous initialization is complete. 209 // asynchronous initialization is complete.
210 // Caution: The returned pointer also transfers ownership of the adapter. The 210 // Caution: The returned pointer also transfers ownership of the adapter. The
211 // caller is expected to call |AddRef()| on the returned pointer, typically by 211 // caller is expected to call |AddRef()| on the returned pointer, typically by
212 // storing it into a |scoped_refptr|. 212 // storing it into a |scoped_refptr|.
213 static base::WeakPtr<BluetoothAdapter> CreateAdapter( 213 static base::WeakPtr<BluetoothAdapter> CreateAdapter(
214 const InitCallback& init_callback); 214 const InitCallback& init_callback);
215 215
216 // Returns a weak pointer to an existing adapter for testing purposes only. 216 // Returns a weak pointer to an existing adapter for testing purposes only.
217 base::WeakPtr<BluetoothAdapter> GetWeakPtrForTesting(); 217 base::WeakPtr<BluetoothAdapter> GetWeakPtrForTesting();
218 218
219 #if defined(OS_CHROMEOS) 219 #if defined(OS_CHROMEOS) || defined(OS_LINUX)
220 // Shutdown the adapter: tear down and clean up all objects owned by 220 // Shutdown the adapter: tear down and clean up all objects owned by
221 // BluetoothAdapter. After this call, the BluetoothAdapter will behave as if 221 // BluetoothAdapter. After this call, the BluetoothAdapter will behave as if
222 // no Bluetooth controller exists in the local system. |IsPresent| will return 222 // no Bluetooth controller exists in the local system. |IsPresent| will return
223 // false. 223 // false.
224 virtual void Shutdown(); 224 virtual void Shutdown();
225 #endif 225 #endif
226 226
227 // Adds and removes observers for events on this bluetooth adapter. If 227 // Adds and removes observers for events on this bluetooth adapter. If
228 // monitoring multiple adapters, check the |adapter| parameter of observer 228 // monitoring multiple adapters, check the |adapter| parameter of observer
229 // methods to determine which adapter is issuing the event. 229 // methods to determine which adapter is issuing the event.
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 std::set<BluetoothDiscoverySession*> discovery_sessions_; 519 std::set<BluetoothDiscoverySession*> discovery_sessions_;
520 520
521 // Note: This should remain the last member so it'll be destroyed and 521 // Note: This should remain the last member so it'll be destroyed and
522 // invalidate its weak pointers before any other members are destroyed. 522 // invalidate its weak pointers before any other members are destroyed.
523 base::WeakPtrFactory<BluetoothAdapter> weak_ptr_factory_; 523 base::WeakPtrFactory<BluetoothAdapter> weak_ptr_factory_;
524 }; 524 };
525 525
526 } // namespace device 526 } // namespace device
527 527
528 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_H_ 528 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_H_
OLDNEW
« no previous file with comments | « device/bluetooth/bluetooth.gyp ('k') | device/bluetooth/bluetooth_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698