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

Side by Side Diff: device/bluetooth/test/fake_central.h

Issue 2874873003: bluetooth: Implement simulateGATTConnectionResponse() (Closed)
Patch Set: fix Created 3 years, 6 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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 #ifndef DEVICE_BLUETOOTH_TEST_FAKE_CENTRAL_H_ 4 #ifndef DEVICE_BLUETOOTH_TEST_FAKE_CENTRAL_H_
5 #define DEVICE_BLUETOOTH_TEST_FAKE_CENTRAL_H_ 5 #define DEVICE_BLUETOOTH_TEST_FAKE_CENTRAL_H_
6 6
7 #include <memory> 7 #include <memory>
8 #include <string> 8 #include <string>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 11 matching lines...) Expand all
22 public device::BluetoothAdapter { 22 public device::BluetoothAdapter {
23 public: 23 public:
24 FakeCentral(mojom::CentralState state, mojom::FakeCentralRequest request); 24 FakeCentral(mojom::CentralState state, mojom::FakeCentralRequest request);
25 25
26 // FakeCentral overrides: 26 // FakeCentral overrides:
27 void SimulatePreconnectedPeripheral( 27 void SimulatePreconnectedPeripheral(
28 const std::string& address, 28 const std::string& address,
29 const std::string& name, 29 const std::string& name,
30 const std::vector<device::BluetoothUUID>& known_service_uuids, 30 const std::vector<device::BluetoothUUID>& known_service_uuids,
31 SimulatePreconnectedPeripheralCallback callback) override; 31 SimulatePreconnectedPeripheralCallback callback) override;
32 void SetNextGATTConnectionResponse(
33 const std::string& address,
34 uint16_t code,
35 SetNextGATTConnectionResponseCallback) override;
32 36
33 // BluetoothAdapter overrides: 37 // BluetoothAdapter overrides:
34 std::string GetAddress() const override; 38 std::string GetAddress() const override;
35 std::string GetName() const override; 39 std::string GetName() const override;
36 void SetName(const std::string& name, 40 void SetName(const std::string& name,
37 const base::Closure& callback, 41 const base::Closure& callback,
38 const ErrorCallback& error_callback) override; 42 const ErrorCallback& error_callback) override;
39 bool IsInitialized() const override; 43 bool IsInitialized() const override;
40 bool IsPresent() const override; 44 bool IsPresent() const override;
41 bool IsPowered() const override; 45 bool IsPowered() const override;
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 private: 93 private:
90 ~FakeCentral() override; 94 ~FakeCentral() override;
91 95
92 mojom::CentralState state_; 96 mojom::CentralState state_;
93 mojo::Binding<mojom::FakeCentral> binding_; 97 mojo::Binding<mojom::FakeCentral> binding_;
94 }; 98 };
95 99
96 } // namespace bluetooth 100 } // namespace bluetooth
97 101
98 #endif // DEVICE_BLUETOOTH_TEST_FAKE_CENTRAL_H_ 102 #endif // DEVICE_BLUETOOTH_TEST_FAKE_CENTRAL_H_
OLDNEW
« no previous file with comments | « device/bluetooth/public/interfaces/test/fake_bluetooth.mojom ('k') | device/bluetooth/test/fake_central.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698