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

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

Issue 2244693002: bluetooth: Refactor how we update based on Advertising Data (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 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 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_ANDROID_H_ 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_ANDROID_H_
6 #define DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_ANDROID_H_ 6 #define DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_ANDROID_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 static bool RegisterJNI(JNIEnv* env); 42 static bool RegisterJNI(JNIEnv* env);
43 43
44 // Returns the associated ChromeBluetoothDevice Java object. 44 // Returns the associated ChromeBluetoothDevice Java object.
45 base::android::ScopedJavaLocalRef<jobject> GetJavaObject(); 45 base::android::ScopedJavaLocalRef<jobject> GetJavaObject();
46 46
47 // Get owning BluetoothAdapter cast to BluetoothAdapterAndroid. 47 // Get owning BluetoothAdapter cast to BluetoothAdapterAndroid.
48 BluetoothAdapterAndroid* GetAndroidAdapter() { 48 BluetoothAdapterAndroid* GetAndroidAdapter() {
49 return static_cast<BluetoothAdapterAndroid*>(adapter_); 49 return static_cast<BluetoothAdapterAndroid*>(adapter_);
50 } 50 }
51 51
52 // Replaces cached copy of advertised UUIDs discovered during a scan.
53 void UpdateAdvertisedUUIDs(
54 jobjectArray advertised_uuids); // Java Type: String[]
55
56 // BluetoothDevice: 52 // BluetoothDevice:
57 uint32_t GetBluetoothClass() const override; 53 uint32_t GetBluetoothClass() const override;
58 std::string GetAddress() const override; 54 std::string GetAddress() const override;
59 VendorIDSource GetVendorIDSource() const override; 55 VendorIDSource GetVendorIDSource() const override;
60 uint16_t GetVendorID() const override; 56 uint16_t GetVendorID() const override;
61 uint16_t GetProductID() const override; 57 uint16_t GetProductID() const override;
62 uint16_t GetDeviceID() const override; 58 uint16_t GetDeviceID() const override;
63 uint16_t GetAppearance() const override; 59 uint16_t GetAppearance() const override;
64 base::Optional<std::string> GetName() const override; 60 base::Optional<std::string> GetName() const override;
65 bool IsPaired() const override; 61 bool IsPaired() const override;
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 base::android::ScopedJavaGlobalRef<jobject> j_device_; 124 base::android::ScopedJavaGlobalRef<jobject> j_device_;
129 125
130 bool gatt_connected_ = false; 126 bool gatt_connected_ = false;
131 127
132 DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceAndroid); 128 DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceAndroid);
133 }; 129 };
134 130
135 } // namespace device 131 } // namespace device
136 132
137 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_ANDROID_H_ 133 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698