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

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

Issue 652403002: [Clean up] Expose ConnectToServiceInsecurely as a BluetoothDevice API on all platforms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase: Restore deps rather than public_deps Created 6 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_device.h ('k') | device/bluetooth/bluetooth_device_mac.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 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_DEVICE_CHROMEOS_H 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_CHROMEOS_H
6 #define DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_CHROMEOS_H 6 #define DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_CHROMEOS_H
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 virtual void RejectPairing() override; 59 virtual void RejectPairing() override;
60 virtual void CancelPairing() override; 60 virtual void CancelPairing() override;
61 virtual void Disconnect( 61 virtual void Disconnect(
62 const base::Closure& callback, 62 const base::Closure& callback,
63 const ErrorCallback& error_callback) override; 63 const ErrorCallback& error_callback) override;
64 virtual void Forget(const ErrorCallback& error_callback) override; 64 virtual void Forget(const ErrorCallback& error_callback) override;
65 virtual void ConnectToService( 65 virtual void ConnectToService(
66 const device::BluetoothUUID& uuid, 66 const device::BluetoothUUID& uuid,
67 const ConnectToServiceCallback& callback, 67 const ConnectToServiceCallback& callback,
68 const ConnectToServiceErrorCallback& error_callback) override; 68 const ConnectToServiceErrorCallback& error_callback) override;
69 virtual void ConnectToServiceInsecurely(
70 const device::BluetoothUUID& uuid,
71 const ConnectToServiceCallback& callback,
72 const ConnectToServiceErrorCallback& error_callback) override;
69 virtual void CreateGattConnection( 73 virtual void CreateGattConnection(
70 const GattConnectionCallback& callback, 74 const GattConnectionCallback& callback,
71 const ConnectErrorCallback& error_callback) override; 75 const ConnectErrorCallback& error_callback) override;
72 virtual void StartConnectionMonitor( 76 virtual void StartConnectionMonitor(
73 const base::Closure& callback, 77 const base::Closure& callback,
74 const ErrorCallback& error_callback) override; 78 const ErrorCallback& error_callback) override;
75 79
76 // Attempts to initiate an insecure outgoing L2CAP or RFCOMM connection to the
77 // advertised service on this device matching |uuid|, performing an SDP lookup
78 // if necessary to determine the correct protocol and channel for the
79 // connection. Unlike ConnectToService, the outgoing connection will request
80 // no bonding rather than general bonding. |callback| will be called on a
81 // successful connection with a BluetoothSocket instance that is to be owned
82 // by the receiver. |error_callback| will be called on failure with a message
83 // indicating the cause.
84 void ConnectToServiceInsecurely(
85 const device::BluetoothUUID& uuid,
86 const ConnectToServiceCallback& callback,
87 const ConnectToServiceErrorCallback& error_callback);
88
89 // Creates a pairing object with the given delegate |pairing_delegate| and 80 // Creates a pairing object with the given delegate |pairing_delegate| and
90 // establishes it as the pairing context for this device. All pairing-related 81 // establishes it as the pairing context for this device. All pairing-related
91 // method calls will be forwarded to this object until it is released. 82 // method calls will be forwarded to this object until it is released.
92 BluetoothPairingChromeOS* BeginPairing( 83 BluetoothPairingChromeOS* BeginPairing(
93 BluetoothDevice::PairingDelegate* pairing_delegate); 84 BluetoothDevice::PairingDelegate* pairing_delegate);
94 85
95 // Releases the current pairing object, any pairing-related method calls will 86 // Releases the current pairing object, any pairing-related method calls will
96 // be ignored. 87 // be ignored.
97 void EndPairing(); 88 void EndPairing();
98 89
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 // Note: This should remain the last member so it'll be destroyed and 190 // Note: This should remain the last member so it'll be destroyed and
200 // invalidate its weak pointers before any other members are destroyed. 191 // invalidate its weak pointers before any other members are destroyed.
201 base::WeakPtrFactory<BluetoothDeviceChromeOS> weak_ptr_factory_; 192 base::WeakPtrFactory<BluetoothDeviceChromeOS> weak_ptr_factory_;
202 193
203 DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceChromeOS); 194 DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceChromeOS);
204 }; 195 };
205 196
206 } // namespace chromeos 197 } // namespace chromeos
207 198
208 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_CHROMEOS_H 199 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_CHROMEOS_H
OLDNEW
« no previous file with comments | « device/bluetooth/bluetooth_device.h ('k') | device/bluetooth/bluetooth_device_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698