OLD | NEW |
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 #include "device/bluetooth/bluetooth_profile_mac.h" | 5 #include "device/bluetooth/bluetooth_profile_mac.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/location.h" | 11 #include "base/location.h" |
12 #include "base/logging.h" | 12 #include "base/logging.h" |
13 #include "base/mac/scoped_cftyperef.h" | 13 #include "base/mac/scoped_cftyperef.h" |
| 14 #include "base/mac/sdk_forward_declarations.h" |
14 #include "base/memory/ref_counted.h" | 15 #include "base/memory/ref_counted.h" |
15 #include "base/strings/string_number_conversions.h" | 16 #include "base/strings/string_number_conversions.h" |
16 #include "base/strings/sys_string_conversions.h" | 17 #include "base/strings/sys_string_conversions.h" |
17 #include "device/bluetooth/bluetooth_adapter_factory.h" | 18 #include "device/bluetooth/bluetooth_adapter_factory.h" |
18 #include "device/bluetooth/bluetooth_device_mac.h" | 19 #include "device/bluetooth/bluetooth_device_mac.h" |
19 #include "device/bluetooth/bluetooth_socket_mac.h" | 20 #include "device/bluetooth/bluetooth_socket_mac.h" |
20 | 21 |
21 // Replicate specific 10.7 SDK declarations for building with prior SDKs. | |
22 #if !defined(MAC_OS_X_VERSION_10_7) || \ | |
23 MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7 | |
24 | |
25 @interface IOBluetoothDevice (LionSDKDeclarations) | |
26 - (IOReturn)performSDPQuery:(id)target uuids:(NSArray*)uuids; | |
27 @end | |
28 | |
29 #endif // MAC_OS_X_VERSION_10_7 | |
30 | |
31 namespace device { | 22 namespace device { |
32 namespace { | 23 namespace { |
33 | 24 |
34 const char kNoConnectionCallback[] = "Connection callback not set"; | 25 const char kNoConnectionCallback[] = "Connection callback not set"; |
35 const char kSDPQueryFailed[] = "SDP query failed"; | 26 const char kSDPQueryFailed[] = "SDP query failed"; |
36 const char kProfileNotFound[] = "Profile not found"; | 27 const char kProfileNotFound[] = "Profile not found"; |
37 | 28 |
38 // It's safe to use 0 to represent an unregistered service, as implied by the | 29 // It's safe to use 0 to represent an unregistered service, as implied by the |
39 // documentation at [ http://goo.gl/YRtCkF ]. | 30 // documentation at [ http://goo.gl/YRtCkF ]. |
40 const BluetoothSDPServiceRecordHandle kInvalidServiceRecordHandle = 0; | 31 const BluetoothSDPServiceRecordHandle kInvalidServiceRecordHandle = 0; |
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
394 // then they would not be freed until the user restarts Chrome. | 385 // then they would not be freed until the user restarts Chrome. |
395 // http://crbug.com/367316 | 386 // http://crbug.com/367316 |
396 // TODO(isherman): Likewise, the socket currently remains alive even if the | 387 // TODO(isherman): Likewise, the socket currently remains alive even if the |
397 // underlying rfcomm_channel is closed, e.g. via the client disconnecting, or | 388 // underlying rfcomm_channel is closed, e.g. via the client disconnecting, or |
398 // the user closing the Bluetooth connection via the system menu. This | 389 // the user closing the Bluetooth connection via the system menu. This |
399 // functions essentially as a minor memory leak. | 390 // functions essentially as a minor memory leak. |
400 // http://crbug.com/367319 | 391 // http://crbug.com/367319 |
401 } | 392 } |
402 | 393 |
403 } // namespace device | 394 } // namespace device |
OLD | NEW |