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

Side by Side Diff: device/bluetooth/bluetooth_profile.cc

Issue 320463002: Bluetooth: Implement socket API for Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: DeviceWin return SDRWin to avoid cast Created 6 years, 6 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
« no previous file with comments | « device/bluetooth/bluetooth_device_win.cc ('k') | device/bluetooth/bluetooth_profile_win.h » ('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) 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_MACOSX) 7 #if defined(OS_MACOSX)
8 #include "base/mac/mac_util.h" 8 #include "base/mac/mac_util.h"
9 #elif defined(OS_WIN)
10 #include "device/bluetooth/bluetooth_profile_win.h"
11 #endif 9 #endif
12 10
13 namespace device { 11 namespace device {
14 12
15 BluetoothProfile::Options::Options() 13 BluetoothProfile::Options::Options()
16 : channel(0), 14 : channel(0),
17 psm(0), 15 psm(0),
18 require_authentication(false), 16 require_authentication(false),
19 require_authorization(false), 17 require_authorization(false),
20 auto_connect(false), 18 auto_connect(false),
(...skipping 23 matching lines...) Expand all
44 // static 42 // static
45 void BluetoothProfile::Register(const BluetoothUUID& uuid, 43 void BluetoothProfile::Register(const BluetoothUUID& uuid,
46 const Options& options, 44 const Options& options,
47 const ProfileCallback& callback) { 45 const ProfileCallback& callback) {
48 #if defined(OS_MACOSX) 46 #if defined(OS_MACOSX)
49 BluetoothProfile* profile = NULL; 47 BluetoothProfile* profile = NULL;
50 48
51 if (base::mac::IsOSLionOrLater()) 49 if (base::mac::IsOSLionOrLater())
52 profile = CreateBluetoothProfileMac(uuid, options); 50 profile = CreateBluetoothProfileMac(uuid, options);
53 callback.Run(profile); 51 callback.Run(profile);
54 #elif defined(OS_WIN)
55 BluetoothProfileWin* profile = NULL;
56 profile = new BluetoothProfileWin();
57 profile->Init(uuid, options, callback);
58 #else 52 #else
59 callback.Run(NULL); 53 callback.Run(NULL);
60 #endif 54 #endif
61 } 55 }
62 56
63 } // namespace device 57 } // namespace device
OLDNEW
« no previous file with comments | « device/bluetooth/bluetooth_device_win.cc ('k') | device/bluetooth/bluetooth_profile_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698