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

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

Issue 1276353005: Planned implementation of CreateGattConnection Base URL: https://chromium.googlesource.com/chromium/src.git@adapimpl-simple
Patch Set: 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_gatt_connection_mac.h" 5 #include "device/bluetooth/bluetooth_gatt_connection_mac.h"
6 6
7 namespace device { 7 namespace device {
8 8
9 BluetoothGattConnectionMac::BluetoothGattConnectionMac( 9 BluetoothGattConnectionMac::BluetoothGattConnectionMac(
10 scoped_refptr<BluetoothAdapter> adapter, 10 scoped_refptr<BluetoothAdapter> adapter,
11 std::string device_address) 11 std::string device_address)
12 : adapter_(adapter), device_address_(device_address) {} 12 : adapter_(adapter), device_address_(device_address) {}
13 13
14 BluetoothGattConnectionMac::~BluetoothGattConnectionMac() {} 14 BluetoothGattConnectionMac::~BluetoothGattConnectionMac() {}
15 15
16 // BluetoothGattConenction overrides. 16 // BluetoothGattConenction overrides.
17 std::string BluetoothGattConnectionMac::GetDeviceAddress() const { 17 std::string BluetoothGattConnectionMac::GetDeviceAddress() const {
18 return device_address_; 18 return device_address_;
19 } 19 }
20 20
21 bool BluetoothGattConnectionMac::IsConnected() { 21 bool BluetoothGattConnectionMac::IsConnected() {
22 return false; 22 BluetoothDevice* device = adapter_->GetDevice(device_address_);
23 return device->IsConnected();
23 } 24 }
24 25
25 void BluetoothGattConnectionMac::Disconnect(const base::Closure& callback) {} 26 void BluetoothGattConnectionMac::Disconnect(const base::Closure& callback) {
27 // TODO: decrement counter on device.
28 }
26 29
27 } // namespace device 30 } // namespace device
OLDNEW
« no previous file with comments | « device/bluetooth/bluetooth_adapter_mac_unittest.mm ('k') | device/bluetooth/bluetooth_low_energy_central_manager_delegate.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698