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

Side by Side Diff: device/bluetooth/bluetooth_socket_mac.mm

Issue 1261093004: Adding BluetoothGattConnectionMac class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@test3
Patch Set: pulling in landed prev CL Created 5 years, 4 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_gatt_connection_mac.mm ('k') | no next file » | 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 #include "device/bluetooth/bluetooth_socket_mac.h" 5 #include "device/bluetooth/bluetooth_socket_mac.h"
6 6
7 #import <IOBluetooth/IOBluetooth.h> 7 #import <IOBluetooth/IOBluetooth.h>
8 8
9 #include <limits> 9 #include <limits>
10 #include <sstream> 10 #include <sstream>
(...skipping 850 matching lines...) Expand 10 before | Expand all | Expand 10 after
861 AcceptConnectionRequest(); 861 AcceptConnectionRequest();
862 } 862 }
863 863
864 void BluetoothSocketMac::AcceptConnectionRequest() { 864 void BluetoothSocketMac::AcceptConnectionRequest() {
865 DCHECK(thread_checker_.CalledOnValidThread()); 865 DCHECK(thread_checker_.CalledOnValidThread());
866 DVLOG(1) << uuid_.canonical_value() << ": Accepting pending connection."; 866 DVLOG(1) << uuid_.canonical_value() << ": Accepting pending connection.";
867 867
868 linked_ptr<BluetoothChannelMac> channel = accept_queue_.front(); 868 linked_ptr<BluetoothChannelMac> channel = accept_queue_.front();
869 accept_queue_.pop(); 869 accept_queue_.pop();
870 870
871 adapter_->DeviceConnected(channel->GetDevice()); 871 adapter_->ClassicDeviceConnected(channel->GetDevice());
872 BluetoothDevice* device = adapter_->GetDevice(channel->GetDeviceAddress()); 872 BluetoothDevice* device = adapter_->GetDevice(channel->GetDeviceAddress());
873 DCHECK(device); 873 DCHECK(device);
874 874
875 scoped_refptr<BluetoothSocketMac> client_socket = 875 scoped_refptr<BluetoothSocketMac> client_socket =
876 BluetoothSocketMac::CreateSocket(); 876 BluetoothSocketMac::CreateSocket();
877 877
878 client_socket->uuid_ = uuid_; 878 client_socket->uuid_ = uuid_;
879 client_socket->channel_.reset(channel.release()); 879 client_socket->channel_.reset(channel.release());
880 880
881 // Associating the socket can synchronously call into OnChannelOpenComplete(). 881 // Associating the socket can synchronously call into OnChannelOpenComplete().
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
941 rfcomm_connection_listener_.reset(); 941 rfcomm_connection_listener_.reset();
942 l2cap_connection_listener_.reset(); 942 l2cap_connection_listener_.reset();
943 943
944 // Destroying the listener above prevents the callback delegate from being 944 // Destroying the listener above prevents the callback delegate from being
945 // called so it is now safe to release all callback state. 945 // called so it is now safe to release all callback state.
946 accept_request_.reset(); 946 accept_request_.reset();
947 empty_queue(accept_queue_); 947 empty_queue(accept_queue_);
948 } 948 }
949 949
950 } // namespace device 950 } // namespace device
OLDNEW
« no previous file with comments | « device/bluetooth/bluetooth_gatt_connection_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698