| 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 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 // - Health Thermometer UUID (0x1809) | 309 // - Health Thermometer UUID (0x1809) |
| 310 // - Services: | 310 // - Services: |
| 311 // - Generic Access Service - Characteristics as described in | 311 // - Generic Access Service - Characteristics as described in |
| 312 // GetGenericAccessService. | 312 // GetGenericAccessService. |
| 313 // - Request Disconnection Service: - Characteristics as described in | 313 // - Request Disconnection Service: - Characteristics as described in |
| 314 // GetDisconnectingService | 314 // GetDisconnectingService |
| 315 // - Health Thermometer: | 315 // - Health Thermometer: |
| 316 // - Measurement Interval (0x2a21): | 316 // - Measurement Interval (0x2a21): |
| 317 // - Read: Calls GattCharacteristicValueChanged and success | 317 // - Read: Calls GattCharacteristicValueChanged and success |
| 318 // callback with [1]. | 318 // callback with [1]. |
| 319 // - Write: Calls success callback. |
| 319 // - GetProperties: Returns | 320 // - GetProperties: Returns |
| 320 // BluetoothRemoteGattCharacteristic::PROPERTY_READ | 321 // BluetoothRemoteGattCharacteristic::PROPERTY_READ |
| 321 // TODO(crbug.com/608538): Mock Write and StartNotifySession. | 322 // TODO(crbug.com/608538): Mock Write and StartNotifySession. |
| 322 static scoped_refptr<testing::NiceMock<device::MockBluetoothAdapter>> | 323 static scoped_refptr<testing::NiceMock<device::MockBluetoothAdapter>> |
| 323 GetDisconnectingHealthThermometer(); | 324 GetDisconnectingHealthThermometer(); |
| 324 | 325 |
| 325 // |ServicesDiscoveredAfterReconnectionAdapter|(disconnect) | 326 // |ServicesDiscoveredAfterReconnectionAdapter|(disconnect) |
| 326 // Inherits from |HeartRateAdapter| | 327 // Inherits from |HeartRateAdapter| |
| 327 // Internal Structure: | 328 // Internal Structure: |
| 328 // - Heart Rate Device | 329 // - Heart Rate Device |
| (...skipping 25 matching lines...) Expand all Loading... |
| 354 // - Health Thermometer UUID (0x1809) | 355 // - Health Thermometer UUID (0x1809) |
| 355 // - Services: | 356 // - Services: |
| 356 // - Generic Access Service - Characteristics as described in | 357 // - Generic Access Service - Characteristics as described in |
| 357 // GetGenericAccessService. | 358 // GetGenericAccessService. |
| 358 // - Health Thermometer | 359 // - Health Thermometer |
| 359 // - Measurement Interval: | 360 // - Measurement Interval: |
| 360 // - Read: If |succeeds| is true, saves a succeeding callback, | 361 // - Read: If |succeeds| is true, saves a succeeding callback, |
| 361 // otherwise it saves a failing callback. This callback | 362 // otherwise it saves a failing callback. This callback |
| 362 // is run during CreateGattConnection. If |disconnect| is true | 363 // is run during CreateGattConnection. If |disconnect| is true |
| 363 // disconnects the device. | 364 // disconnects the device. |
| 365 // - Write: If |succeeds| is true, saves a succeeding callback, |
| 366 // otherwise it saves a failing callback. This callback is run |
| 367 // during CreateGattConnection. If |disconnect| is true |
| 368 // disconnects the device. |
| 364 // - CreateGattConnection: Runs success callback with a new GATT | 369 // - CreateGattConnection: Runs success callback with a new GATT |
| 365 // connection and runs any pending GATT operation callbacks. | 370 // connection and runs any pending GATT operation callbacks. |
| 366 static scoped_refptr<testing::NiceMock<device::MockBluetoothAdapter>> | 371 static scoped_refptr<testing::NiceMock<device::MockBluetoothAdapter>> |
| 367 GetGATTOperationFinishesAfterReconnectionAdapter(bool disconnect, | 372 GetGATTOperationFinishesAfterReconnectionAdapter(bool disconnect, |
| 368 bool succeeds); | 373 bool succeeds); |
| 369 | 374 |
| 370 // |BlacklistTestAdapter| | 375 // |BlacklistTestAdapter| |
| 371 // Inherits from |EmptyAdapter| | 376 // Inherits from |EmptyAdapter| |
| 372 // Internal Structure: | 377 // Internal Structure: |
| 373 // - |ConnectableDevice|(adapter, "Blacklist Test Device", uuids) | 378 // - |ConnectableDevice|(adapter, "Blacklist Test Device", uuids) |
| (...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 796 | 801 |
| 797 // Function to turn an integer into an MAC address of the form | 802 // Function to turn an integer into an MAC address of the form |
| 798 // XX:XX:XX:XX:XX:XX. For example makeMACAddress(0xdeadbeef) | 803 // XX:XX:XX:XX:XX:XX. For example makeMACAddress(0xdeadbeef) |
| 799 // returns "00:00:DE:AD:BE:EF". | 804 // returns "00:00:DE:AD:BE:EF". |
| 800 static std::string makeMACAddress(uint64_t addr); | 805 static std::string makeMACAddress(uint64_t addr); |
| 801 }; | 806 }; |
| 802 | 807 |
| 803 } // namespace content | 808 } // namespace content |
| 804 | 809 |
| 805 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_BLUETOOTH_ADAPTER_PROVI
DER_H_ | 810 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_BLUETOOTH_ADAPTER_PROVI
DER_H_ |
| OLD | NEW |