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

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

Issue 1292263002: bluetooth: Create base class BluetoothDevice::CreateGattConnection impl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bt-adapter-
Patch Set: fix ProximityAuthBluetoothLowEnergyConnectionTest Created 5 years, 3 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_device_android.h" 5 #include "device/bluetooth/bluetooth_device_android.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/android/jni_array.h" 8 #include "base/android/jni_array.h"
9 #include "base/android/jni_string.h" 9 #include "base/android/jni_string.h"
10 #include "device/bluetooth/bluetooth_adapter_android.h" 10 #include "device/bluetooth/bluetooth_adapter_android.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 // Android API does not provide Device ID. 69 // Android API does not provide Device ID.
70 return 0; 70 return 0;
71 } 71 }
72 72
73 bool BluetoothDeviceAndroid::IsPaired() const { 73 bool BluetoothDeviceAndroid::IsPaired() const {
74 return Java_ChromeBluetoothDevice_isPaired(AttachCurrentThread(), 74 return Java_ChromeBluetoothDevice_isPaired(AttachCurrentThread(),
75 j_device_.obj()); 75 j_device_.obj());
76 } 76 }
77 77
78 bool BluetoothDeviceAndroid::IsConnected() const { 78 bool BluetoothDeviceAndroid::IsConnected() const {
79 NOTIMPLEMENTED(); 79 return IsGattConnected();
80 return false; 80 }
81
82 bool BluetoothDeviceAndroid::IsGattConnected() const {
83 return gatt_connected_;
81 } 84 }
82 85
83 bool BluetoothDeviceAndroid::IsConnectable() const { 86 bool BluetoothDeviceAndroid::IsConnectable() const {
84 NOTIMPLEMENTED(); 87 NOTIMPLEMENTED();
85 return false; 88 return false;
86 } 89 }
87 90
88 bool BluetoothDeviceAndroid::IsConnecting() const { 91 bool BluetoothDeviceAndroid::IsConnecting() const {
89 NOTIMPLEMENTED(); 92 NOTIMPLEMENTED();
90 return false; 93 return false;
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 NOTIMPLEMENTED(); 181 NOTIMPLEMENTED();
179 } 182 }
180 183
181 void BluetoothDeviceAndroid::ConnectToServiceInsecurely( 184 void BluetoothDeviceAndroid::ConnectToServiceInsecurely(
182 const BluetoothUUID& uuid, 185 const BluetoothUUID& uuid,
183 const ConnectToServiceCallback& callback, 186 const ConnectToServiceCallback& callback,
184 const ConnectToServiceErrorCallback& error_callback) { 187 const ConnectToServiceErrorCallback& error_callback) {
185 NOTIMPLEMENTED(); 188 NOTIMPLEMENTED();
186 } 189 }
187 190
188 void BluetoothDeviceAndroid::CreateGattConnection(
189 const GattConnectionCallback& callback,
190 const ConnectErrorCallback& error_callback) {
191 NOTIMPLEMENTED();
192 }
193
194 BluetoothDeviceAndroid::BluetoothDeviceAndroid(BluetoothAdapterAndroid* adapter) 191 BluetoothDeviceAndroid::BluetoothDeviceAndroid(BluetoothAdapterAndroid* adapter)
195 : BluetoothDevice(adapter) {} 192 : BluetoothDevice(adapter) {}
196 193
197 std::string BluetoothDeviceAndroid::GetDeviceName() const { 194 std::string BluetoothDeviceAndroid::GetDeviceName() const {
198 return ConvertJavaStringToUTF8(Java_ChromeBluetoothDevice_getDeviceName( 195 return ConvertJavaStringToUTF8(Java_ChromeBluetoothDevice_getDeviceName(
199 AttachCurrentThread(), j_device_.obj())); 196 AttachCurrentThread(), j_device_.obj()));
200 } 197 }
201 198
199 void BluetoothDeviceAndroid::CreateGattConnectionImpl() {
200 // Implemented in following patch https://codereview.chromium.org/1256313002
201 NOTIMPLEMENTED();
202 DidFailToConnectGatt(ERROR_UNKNOWN);
203 }
204
205 void BluetoothDeviceAndroid::DisconnectGatt() {
206 // Implemented in following patch https://codereview.chromium.org/1256313002
207 NOTIMPLEMENTED();
208 }
209
202 } // namespace device 210 } // namespace device
OLDNEW
« no previous file with comments | « device/bluetooth/bluetooth_device_android.h ('k') | device/bluetooth/bluetooth_device_chromeos.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698