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

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

Issue 180163009: chrome.bluetooth API improvements. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix ChromeOS Full build. Created 6 years, 8 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_PROFILE_WIN_H_ 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_PROFILE_WIN_H_
6 #define DEVICE_BLUETOOTH_BLUETOOTH_PROFILE_WIN_H_ 6 #define DEVICE_BLUETOOTH_BLUETOOTH_PROFILE_WIN_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "device/bluetooth/bluetooth_profile.h" 10 #include "device/bluetooth/bluetooth_profile.h"
11 #include "device/bluetooth/bluetooth_uuid.h" 11 #include "device/bluetooth/bluetooth_uuid.h"
12 #include "net/base/net_log.h"
12 13
13 namespace device { 14 namespace device {
14 15
15 class BluetoothDeviceWin; 16 class BluetoothDeviceWin;
17 class BluetoothSocketThreadWin;
16 18
17 class BluetoothProfileWin : public BluetoothProfile { 19 class BluetoothProfileWin : public BluetoothProfile {
18 public: 20 public:
19 // BluetoothProfile override. 21 // BluetoothProfile override.
20 virtual void Unregister() OVERRIDE; 22 virtual void Unregister() OVERRIDE;
21 virtual void SetConnectionCallback( 23 virtual void SetConnectionCallback(
22 const ConnectionCallback& callback) OVERRIDE; 24 const ConnectionCallback& callback) OVERRIDE;
23 25
24 bool Connect(const BluetoothDeviceWin* device); 26 typedef base::Callback<void(const std::string&)> ErrorCallback;
27
28 void Connect(const BluetoothDeviceWin* device,
29 scoped_refptr<base::SequencedTaskRunner> ui_task_runner,
30 scoped_refptr<BluetoothSocketThreadWin> socket_thread,
31 net::NetLog* net_log,
32 const net::NetLog::Source& source,
33 const base::Closure& callback,
34 const ErrorCallback& error_callback);
25 35
26 private: 36 private:
27 friend BluetoothProfile; 37 friend BluetoothProfile;
28 38
29 BluetoothProfileWin(const BluetoothUUID& uuid, const std::string& name); 39 BluetoothProfileWin(const BluetoothUUID& uuid, const std::string& name);
30 virtual ~BluetoothProfileWin(); 40 virtual ~BluetoothProfileWin();
31 41
32 const BluetoothUUID uuid_; 42 const BluetoothUUID uuid_;
33 const std::string name_; 43 const std::string name_;
34 ConnectionCallback connection_callback_; 44 ConnectionCallback connection_callback_;
45
46 DISALLOW_COPY_AND_ASSIGN(BluetoothProfileWin);
35 }; 47 };
36 48
37 } // namespace device 49 } // namespace device
38 50
39 #endif // DEVICE_BLUETOOTH_BLUETOOTH_PROFILE_WIN_H_ 51 #endif // DEVICE_BLUETOOTH_BLUETOOTH_PROFILE_WIN_H_
OLDNEW
« no previous file with comments | « device/bluetooth/bluetooth_profile_chromeos_unittest.cc ('k') | device/bluetooth/bluetooth_profile_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698