| 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 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 (if |addDescriptors| input is true) | 344 // - Descriptors (if |addDescriptors| input is true) |
| 345 // - User Description (2901) | 345 // - User Description (2901) |
| 346 // - Mock Functions: |
| 347 // - Read: Calls success callback with |
| 348 // "gatt.characteristic_user_description". |
| 349 // - Write: Calls success callback. |
| 346 // - Client Characteristic Configuration (2902) | 350 // - Client Characteristic Configuration (2902) |
| 347 // Note: This descriptor is blocklisted for writes. | 351 // Note: This descriptor is blocklisted for writes. |
| 348 // - bad2ddcf-60db-45cd-bef9-fd72b153cf7c | 352 // - bad2ddcf-60db-45cd-bef9-fd72b153cf7c |
| 349 // A test descriptor that is blocklisted. | 353 // A test descriptor that is blocklisted. |
| 350 // - bad3ec61-3cc3-4954-9702-7977df514114 | 354 // - bad3ec61-3cc3-4954-9702-7977df514114 |
| 351 // A test descriptor that is exclude read.. | 355 // A test descriptor that is exclude read. |
| 352 | 356 |
| 353 static scoped_refptr<testing::NiceMock<device::MockBluetoothAdapter>> | 357 static scoped_refptr<testing::NiceMock<device::MockBluetoothAdapter>> |
| 354 GetDisconnectingHealthThermometer(bool add_descriptors); | 358 GetDisconnectingHealthThermometer(bool add_descriptors); |
| 355 | 359 |
| 356 // |ServicesDiscoveredAfterReconnectionAdapter|(disconnect) | 360 // |ServicesDiscoveredAfterReconnectionAdapter|(disconnect) |
| 357 // Inherits from |HeartRateAdapter| | 361 // Inherits from |HeartRateAdapter| |
| 358 // Internal Structure: | 362 // Internal Structure: |
| 359 // - Heart Rate Device | 363 // - Heart Rate Device |
| 360 // - UUIDs: | 364 // - UUIDs: |
| 361 // - Generic Access UUID (0x1800) | 365 // - Generic Access UUID (0x1800) |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 393 // is run during CreateGattConnection. If |disconnect| is true | 397 // is run during CreateGattConnection. If |disconnect| is true |
| 394 // disconnects the device. | 398 // disconnects the device. |
| 395 // - Write: If |succeeds| is true, saves a succeeding callback, | 399 // - Write: If |succeeds| is true, saves a succeeding callback, |
| 396 // otherwise it saves a failing callback. This callback is run | 400 // otherwise it saves a failing callback. This callback is run |
| 397 // during CreateGattConnection. If |disconnect| is true | 401 // during CreateGattConnection. If |disconnect| is true |
| 398 // disconnects the device. | 402 // disconnects the device. |
| 399 // - StartNotifySession: If |succeeds| is true, saves a | 403 // - StartNotifySession: If |succeeds| is true, saves a |
| 400 // succeeding callback, otherwise it saves a failing callback. | 404 // succeeding callback, otherwise it saves a failing callback. |
| 401 // This calback is run during CreateGattConnection. If | 405 // This calback is run during CreateGattConnection. If |
| 402 // |disconnect| is true disconnects the device. | 406 // |disconnect| is true disconnects the device. |
| 407 // - user_descriptor |
| 408 // - Operations read / write nearly identical to the read and |
| 409 // write methods of the characteristic. |
| 410 // - Read: If |succeeds| is true, saves a succeeding callback, |
| 411 // otherwise it saves a failing callback. |
| 412 // - Write: If |succeeds| is true, saves a succeeding callback |
| 413 // otherwise it saves a failing callback. |
| 403 // - CreateGattConnection: Runs success callback with a new GATT | 414 // - CreateGattConnection: Runs success callback with a new GATT |
| 404 // connection and runs any pending GATT operation callbacks. | 415 // connection and runs any pending GATT operation callbacks. |
| 405 static scoped_refptr<testing::NiceMock<device::MockBluetoothAdapter>> | 416 static scoped_refptr<testing::NiceMock<device::MockBluetoothAdapter>> |
| 406 GetGATTOperationFinishesAfterReconnectionAdapter(bool disconnect, | 417 GetGATTOperationFinishesAfterReconnectionAdapter(bool disconnect, |
| 407 bool succeeds); | 418 bool succeeds); |
| 408 | 419 |
| 409 // |StopNotifySessionFinishesAfterReconnection|(disconnect) | 420 // |StopNotifySessionFinishesAfterReconnection|(disconnect) |
| 410 // Inherits from |EmptyAdapter| | 421 // Inherits from |EmptyAdapter| |
| 411 // Internal Structure: | 422 // Internal Structure: |
| 412 // - Health Thermometer Device | 423 // - Health Thermometer Device |
| (...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 855 | 866 |
| 856 // Function to turn an integer into an MAC address of the form | 867 // Function to turn an integer into an MAC address of the form |
| 857 // XX:XX:XX:XX:XX:XX. For example makeMACAddress(0xdeadbeef) | 868 // XX:XX:XX:XX:XX:XX. For example makeMACAddress(0xdeadbeef) |
| 858 // returns "00:00:DE:AD:BE:EF". | 869 // returns "00:00:DE:AD:BE:EF". |
| 859 static std::string makeMACAddress(uint64_t addr); | 870 static std::string makeMACAddress(uint64_t addr); |
| 860 }; | 871 }; |
| 861 | 872 |
| 862 } // namespace content | 873 } // namespace content |
| 863 | 874 |
| 864 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_BLUETOOTH_ADAPTER_PROVI
DER_H_ | 875 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_BLUETOOTH_ADAPTER_PROVI
DER_H_ |
| OLD | NEW |