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

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

Issue 1723723002: bluetooth: Implement Service.getCharacteristics (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@my-origin
Patch Set: Merge with ToT Created 4 years, 9 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 510 matching lines...) Expand 10 before | Expand all | Expand 10 after
521 // to call GattCharacteristicValueChanged from js. 521 // to call GattCharacteristicValueChanged from js.
522 // https://crbug.com/543884 522 // https://crbug.com/543884
523 // - GetProperties: Returns 523 // - GetProperties: Returns
524 // BluetoothGattCharacteristic::PROPERTY_NOTIFY 524 // BluetoothGattCharacteristic::PROPERTY_NOTIFY
525 // - Body Sensor Location (0x2a38) 525 // - Body Sensor Location (0x2a38)
526 // - Mock Functions: 526 // - Mock Functions:
527 // - Read: Calls GattCharacteristicValueChanged and success 527 // - Read: Calls GattCharacteristicValueChanged and success
528 // callback with [1] which corresponds to chest. 528 // callback with [1] which corresponds to chest.
529 // - GetProperties: Returns 529 // - GetProperties: Returns
530 // BluetoothGattCharacteristic::PROPERTY_READ 530 // BluetoothGattCharacteristic::PROPERTY_READ
531 // - Body Sensor Location (0x2a38)
532 // - Mock Functions:
533 // - Read: Calls GattCharacteristicValueChanged and success
534 // callback with [2] which corresponds to wrist.
535 // - GetProperties: Returns
536 // BluetoothGattCharacteristic::PROPERTY_READ
531 static scoped_ptr<testing::NiceMock<device::MockBluetoothGattService>> 537 static scoped_ptr<testing::NiceMock<device::MockBluetoothGattService>>
532 GetHeartRateService(device::MockBluetoothAdapter* adapter, 538 GetHeartRateService(device::MockBluetoothAdapter* adapter,
533 device::MockBluetoothDevice* device); 539 device::MockBluetoothDevice* device);
534 540
535 // Characteristics 541 // Characteristics
536 542
537 // |BaseCharacteristic|(service, uuid) 543 // |BaseCharacteristic|(identifier, service, uuid)
538 // Descriptors added: 544 // Descriptors added:
539 // None. 545 // None.
540 // Mock Functions: 546 // Mock Functions:
541 // - TODO(ortuno): http://crbug.com/483347 GetDescriptors: 547 // - TODO(ortuno): http://crbug.com/483347 GetDescriptors:
542 // Returns: all descriptors added to the characteristic 548 // Returns: all descriptors added to the characteristic
543 // - TODO(ortuno): http://crbug.com/483347 GetDescriptor: 549 // - TODO(ortuno): http://crbug.com/483347 GetDescriptor:
544 // Returns the descriptor matching the identifier provided if the 550 // Returns the descriptor matching the identifier provided if the
545 // descriptor was added to the characteristic. 551 // descriptor was added to the characteristic.
546 // - GetIdentifier: 552 // - GetIdentifier:
547 // Returns: uuid + “ Identifier” 553 // Returns: identifier
548 // - GetUUID: 554 // - GetUUID:
549 // Returns: uuid 555 // Returns: uuid
550 // - IsLocal: 556 // - IsLocal:
551 // Returns: false 557 // Returns: false
552 // - GetService: 558 // - GetService:
553 // Returns: service 559 // Returns: service
554 // - GetProperties: 560 // - GetProperties:
555 // Returns: NULL 561 // Returns: NULL
556 // - GetPermissions: 562 // - GetPermissions:
557 // Returns: NULL 563 // Returns: NULL
558 static scoped_ptr<testing::NiceMock<device::MockBluetoothGattCharacteristic>> 564 static scoped_ptr<testing::NiceMock<device::MockBluetoothGattCharacteristic>>
559 GetBaseGATTCharacteristic( 565 GetBaseGATTCharacteristic(
566 const std::string& identifier,
560 device::MockBluetoothGattService* service, 567 device::MockBluetoothGattService* service,
561 const std::string& uuid, 568 const std::string& uuid,
562 device::BluetoothGattCharacteristic::Properties properties); 569 device::BluetoothGattCharacteristic::Properties properties);
563 570
564 // |ErrorCharacteristic|(service, error_type) 571 // |ErrorCharacteristic|(service, error_type)
565 // Inherits from BaseCharacteristic(service, errorUUID(error_type + 0xA1)) 572 // Inherits from BaseCharacteristic(service, errorUUID(error_type + 0xA1))
566 // Descriptors added: 573 // Descriptors added:
567 // None. 574 // None.
568 // Mock Functions: 575 // Mock Functions:
569 // - ReadRemoteCharacteristic: 576 // - ReadRemoteCharacteristic:
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
610 617
611 // Function to turn an integer into an MAC address of the form 618 // Function to turn an integer into an MAC address of the form
612 // XX:XX:XX:XX:XX:XX. For example makeMACAddress(0xdeadbeef) 619 // XX:XX:XX:XX:XX:XX. For example makeMACAddress(0xdeadbeef)
613 // returns "00:00:DE:AD:BE:EF". 620 // returns "00:00:DE:AD:BE:EF".
614 static std::string makeMACAddress(uint64_t addr); 621 static std::string makeMACAddress(uint64_t addr);
615 }; 622 };
616 623
617 } // namespace content 624 } // namespace content
618 625
619 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_BLUETOOTH_ADAPTER_PROVI DER_H_ 626 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_BLUETOOTH_ADAPTER_PROVI DER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698