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

Unified Diff: device/bluetooth/bluetooth_device_android.cc

Issue 1284073002: bluetooth: Add adapter to BluetoothDevice (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bt-drop-callback-
Patch Set: Merge TOT 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « device/bluetooth/bluetooth_device_android.h ('k') | device/bluetooth/bluetooth_device_chromeos.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/bluetooth_device_android.cc
diff --git a/device/bluetooth/bluetooth_device_android.cc b/device/bluetooth/bluetooth_device_android.cc
index 890244a9f3c755a61d83c1e3f947080bcbd81b3d..fb0ea7f06fdb4789d8cb31b41ddbaefc316f09d5 100644
--- a/device/bluetooth/bluetooth_device_android.cc
+++ b/device/bluetooth/bluetooth_device_android.cc
@@ -7,6 +7,7 @@
#include "base/android/jni_android.h"
#include "base/android/jni_array.h"
#include "base/android/jni_string.h"
+#include "device/bluetooth/bluetooth_adapter_android.h"
#include "jni/ChromeBluetoothDevice_jni.h"
using base::android::AttachCurrentThread;
@@ -15,8 +16,9 @@ using base::android::AppendJavaStringArrayToStringVector;
namespace device {
BluetoothDeviceAndroid* BluetoothDeviceAndroid::Create(
+ BluetoothAdapterAndroid* adapter,
jobject bluetooth_device_wrapper) { // Java Type: bluetoothDeviceWrapper
- BluetoothDeviceAndroid* device = new BluetoothDeviceAndroid();
+ BluetoothDeviceAndroid* device = new BluetoothDeviceAndroid(adapter);
device->j_device_.Reset(Java_ChromeBluetoothDevice_create(
AttachCurrentThread(), bluetooth_device_wrapper));
@@ -189,8 +191,8 @@ void BluetoothDeviceAndroid::CreateGattConnection(
NOTIMPLEMENTED();
}
-BluetoothDeviceAndroid::BluetoothDeviceAndroid() {
-}
+BluetoothDeviceAndroid::BluetoothDeviceAndroid(BluetoothAdapterAndroid* adapter)
+ : BluetoothDevice(adapter) {}
std::string BluetoothDeviceAndroid::GetDeviceName() const {
return ConvertJavaStringToUTF8(Java_ChromeBluetoothDevice_getDeviceName(
« 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