OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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.h" | 5 #include "device/bluetooth/bluetooth_profile.h" |
6 | 6 |
7 #if defined(OS_CHROMEOS) | 7 #if defined(OS_CHROMEOS) |
8 #include "device/bluetooth/bluetooth_profile_chromeos.h" | 8 #include "device/bluetooth/bluetooth_profile_chromeos.h" |
9 #elif defined(OS_MACOSX) | 9 #elif defined(OS_MACOSX) |
10 #include "base/mac/mac_util.h" | 10 #include "base/mac/mac_util.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 chromeos::BluetoothProfileChromeOS* profile = NULL; | 47 chromeos::BluetoothProfileChromeOS* profile = NULL; |
48 profile = new chromeos::BluetoothProfileChromeOS(); | 48 profile = new chromeos::BluetoothProfileChromeOS(); |
49 profile->Init(uuid, options, callback); | 49 profile->Init(uuid, options, callback); |
50 #elif defined(OS_MACOSX) | 50 #elif defined(OS_MACOSX) |
51 BluetoothProfile* profile = NULL; | 51 BluetoothProfile* profile = NULL; |
52 | 52 |
53 if (base::mac::IsOSLionOrLater()) | 53 if (base::mac::IsOSLionOrLater()) |
54 profile = new BluetoothProfileMac(uuid, options.name); | 54 profile = new BluetoothProfileMac(uuid, options.name); |
55 callback.Run(profile); | 55 callback.Run(profile); |
56 #elif defined(OS_WIN) | 56 #elif defined(OS_WIN) |
57 BluetoothProfile* profile = NULL; | 57 BluetoothProfileWin* profile = NULL; |
58 profile = new BluetoothProfileWin(uuid, options.name); | 58 profile = new BluetoothProfileWin(); |
59 callback.Run(profile); | 59 profile->Init(uuid, options, callback); |
60 #else | 60 #else |
61 callback.Run(NULL); | 61 callback.Run(NULL); |
62 #endif | 62 #endif |
63 } | 63 } |
64 | 64 |
65 } // namespace device | 65 } // namespace device |
OLD | NEW |