 Chromium Code Reviews
 Chromium Code Reviews Issue 2637343002:
  Implement WebBluetooth descriptor.readValue()  (Closed)
    
  
    Issue 2637343002:
  Implement WebBluetooth descriptor.readValue()  (Closed) 
  | OLD | NEW | 
|---|---|
| 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 CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_BLUETOOTH_ADAPTER_PROVIDER _H_ | 5 #ifndef CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_BLUETOOTH_ADAPTER_PROVIDER _H_ | 
| 6 #define CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_BLUETOOTH_ADAPTER_PROVIDER _H_ | 6 #define CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_BLUETOOTH_ADAPTER_PROVIDER _H_ | 
| 7 | 7 | 
| 8 #include <stdint.h> | 8 #include <stdint.h> | 
| 9 | 9 | 
| 10 #include "base/callback.h" | 10 #include "base/callback.h" | 
| (...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 334 // - Request Disconnection Service: - Characteristics as described in | 334 // - Request Disconnection Service: - Characteristics as described in | 
| 335 // GetDisconnectingService | 335 // GetDisconnectingService | 
| 336 // - Health Thermometer: | 336 // - Health Thermometer: | 
| 337 // - Measurement Interval (0x2a21): | 337 // - Measurement Interval (0x2a21): | 
| 338 // - Read: Calls GattCharacteristicValueChanged and success | 338 // - Read: Calls GattCharacteristicValueChanged and success | 
| 339 // callback with [1]. | 339 // callback with [1]. | 
| 340 // - Write: Calls success callback. | 340 // - Write: Calls success callback. | 
| 341 // - StartNotifySession: Run success callback. | 341 // - StartNotifySession: Run success callback. | 
| 342 // - GetProperties: Returns | 342 // - GetProperties: Returns | 
| 343 // BluetoothRemoteGattCharacteristic::PROPERTY_READ | 343 // BluetoothRemoteGattCharacteristic::PROPERTY_READ | 
| 344 // - Descriptors | 344 // - Descriptors (if |addDescriptor| input is true) | 
| 
ortuno
2017/01/22 22:04:04
nit: should_add_descriptors or add_descriptors
 
dougt
2017/01/23 21:40:35
Acknowledged.  I am not sure I like using _'s in p
 | |
| 345 // - User Description (2901) | 345 // - User Description (2901) | 
| 346 // - Client Characteristic Configuration (2902) | 346 // - Client Characteristic Configuration (2902) | 
| 347 // Note: This descriptor is blocklisted for writes. | 347 // Note: This descriptor is blocklisted for writes. | 
| 348 // - bad2ddcf-60db-45cd-bef9-fd72b153cf7c | 348 // - bad2ddcf-60db-45cd-bef9-fd72b153cf7c | 
| 349 // A test descriptor that is blocklisted. | 349 // A test descriptor that is blocklisted. | 
| 350 | 350 | 
| 351 static scoped_refptr<testing::NiceMock<device::MockBluetoothAdapter>> | 351 static scoped_refptr<testing::NiceMock<device::MockBluetoothAdapter>> | 
| 352 GetDisconnectingHealthThermometer(); | 352 GetDisconnectingHealthThermometer(bool addDescriptor); | 
| 353 | 353 | 
| 354 // |ServicesDiscoveredAfterReconnectionAdapter|(disconnect) | 354 // |ServicesDiscoveredAfterReconnectionAdapter|(disconnect) | 
| 355 // Inherits from |HeartRateAdapter| | 355 // Inherits from |HeartRateAdapter| | 
| 356 // Internal Structure: | 356 // Internal Structure: | 
| 357 // - Heart Rate Device | 357 // - Heart Rate Device | 
| 358 // - UUIDs: | 358 // - UUIDs: | 
| 359 // - Generic Access UUID (0x1800) | 359 // - Generic Access UUID (0x1800) | 
| 360 // - Heart Rate UUID (0x180d) | 360 // - Heart Rate UUID (0x180d) | 
| 361 // - Services: | 361 // - Services: | 
| 362 // - Generic Access Service - Characteristics as described in | 362 // - Generic Access Service - Characteristics as described in | 
| (...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 853 | 853 | 
| 854 // Function to turn an integer into an MAC address of the form | 854 // Function to turn an integer into an MAC address of the form | 
| 855 // XX:XX:XX:XX:XX:XX. For example makeMACAddress(0xdeadbeef) | 855 // XX:XX:XX:XX:XX:XX. For example makeMACAddress(0xdeadbeef) | 
| 856 // returns "00:00:DE:AD:BE:EF". | 856 // returns "00:00:DE:AD:BE:EF". | 
| 857 static std::string makeMACAddress(uint64_t addr); | 857 static std::string makeMACAddress(uint64_t addr); | 
| 858 }; | 858 }; | 
| 859 | 859 | 
| 860 } // namespace content | 860 } // namespace content | 
| 861 | 861 | 
| 862 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_BLUETOOTH_ADAPTER_PROVI DER_H_ | 862 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_BLUETOOTH_ADAPTER_PROVI DER_H_ | 
| OLD | NEW |