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

Side by Side Diff: content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.h

Issue 2654403002: Implement WebBluetooth descriptor.writeValue() (Closed)
Patch Set: nit Created 3 years, 10 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 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
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 // Note: This descriptor can be written to and will always
ortuno 2017/01/31 19:50:09 Let's try to keep the formatting consistent: //
dougt 2017/01/31 20:59:16 Done.
347 // succeed.
346 // - Client Characteristic Configuration (2902) 348 // - Client Characteristic Configuration (2902)
347 // Note: This descriptor is blocklisted for writes. 349 // Note: This descriptor is blocklisted for writes.
348 // - bad2ddcf-60db-45cd-bef9-fd72b153cf7c 350 // - bad2ddcf-60db-45cd-bef9-fd72b153cf7c
349 // A test descriptor that is blocklisted. 351 // A test descriptor that is blocklisted.
350 // - bad3ec61-3cc3-4954-9702-7977df514114 352 // - bad3ec61-3cc3-4954-9702-7977df514114
351 // A test descriptor that is exclude read.. 353 // A test descriptor that is exclude read.
352 354
353 static scoped_refptr<testing::NiceMock<device::MockBluetoothAdapter>> 355 static scoped_refptr<testing::NiceMock<device::MockBluetoothAdapter>>
354 GetDisconnectingHealthThermometer(bool add_descriptors); 356 GetDisconnectingHealthThermometer(bool add_descriptors);
355 357
356 // |ServicesDiscoveredAfterReconnectionAdapter|(disconnect) 358 // |ServicesDiscoveredAfterReconnectionAdapter|(disconnect)
357 // Inherits from |HeartRateAdapter| 359 // Inherits from |HeartRateAdapter|
358 // Internal Structure: 360 // Internal Structure:
359 // - Heart Rate Device 361 // - Heart Rate Device
360 // - UUIDs: 362 // - UUIDs:
361 // - Generic Access UUID (0x1800) 363 // - Generic Access UUID (0x1800)
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 // is run during CreateGattConnection. If |disconnect| is true 395 // is run during CreateGattConnection. If |disconnect| is true
394 // disconnects the device. 396 // disconnects the device.
395 // - Write: If |succeeds| is true, saves a succeeding callback, 397 // - Write: If |succeeds| is true, saves a succeeding callback,
396 // otherwise it saves a failing callback. This callback is run 398 // otherwise it saves a failing callback. This callback is run
397 // during CreateGattConnection. If |disconnect| is true 399 // during CreateGattConnection. If |disconnect| is true
398 // disconnects the device. 400 // disconnects the device.
399 // - StartNotifySession: If |succeeds| is true, saves a 401 // - StartNotifySession: If |succeeds| is true, saves a
400 // succeeding callback, otherwise it saves a failing callback. 402 // succeeding callback, otherwise it saves a failing callback.
401 // This calback is run during CreateGattConnection. If 403 // This calback is run during CreateGattConnection. If
402 // |disconnect| is true disconnects the device. 404 // |disconnect| is true disconnects the device.
405 // - user_descriptor
406 // - Operations read / write nearly identical to the read and
ortuno 2017/01/31 19:50:09 Not sure why this comment is here?
dougt 2017/01/31 20:59:16 I am documenting that under the Measurement Interv
407 // write methods of the characteristic.
408 // - Read: If |succeeds| is true, saves a succeeding callback,
409 // otherwise it saves a failing callback.
410 // - Write: If |succeeds| is true, saves a succeeding callback
411 // otherwise it saves a failing callback.
403 // - CreateGattConnection: Runs success callback with a new GATT 412 // - CreateGattConnection: Runs success callback with a new GATT
404 // connection and runs any pending GATT operation callbacks. 413 // connection and runs any pending GATT operation callbacks.
405 static scoped_refptr<testing::NiceMock<device::MockBluetoothAdapter>> 414 static scoped_refptr<testing::NiceMock<device::MockBluetoothAdapter>>
406 GetGATTOperationFinishesAfterReconnectionAdapter(bool disconnect, 415 GetGATTOperationFinishesAfterReconnectionAdapter(bool disconnect,
407 bool succeeds); 416 bool succeeds);
408 417
409 // |StopNotifySessionFinishesAfterReconnection|(disconnect) 418 // |StopNotifySessionFinishesAfterReconnection|(disconnect)
410 // Inherits from |EmptyAdapter| 419 // Inherits from |EmptyAdapter|
411 // Internal Structure: 420 // Internal Structure:
412 // - Health Thermometer Device 421 // - Health Thermometer Device
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after
855 864
856 // Function to turn an integer into an MAC address of the form 865 // Function to turn an integer into an MAC address of the form
857 // XX:XX:XX:XX:XX:XX. For example makeMACAddress(0xdeadbeef) 866 // XX:XX:XX:XX:XX:XX. For example makeMACAddress(0xdeadbeef)
858 // returns "00:00:DE:AD:BE:EF". 867 // returns "00:00:DE:AD:BE:EF".
859 static std::string makeMACAddress(uint64_t addr); 868 static std::string makeMACAddress(uint64_t addr);
860 }; 869 };
861 870
862 } // namespace content 871 } // namespace content
863 872
864 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_BLUETOOTH_ADAPTER_PROVI DER_H_ 873 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_BLUETOOTH_ADAPTER_PROVI DER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698