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

Side by Side Diff: components/arc/test/fake_bluetooth_instance.cc

Issue 2511253002: arc: bluetooth: enable use_new_wrapper_types for bluetooth.mojom (Closed)
Patch Set: Rebase again Created 4 years, 1 month 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
« no previous file with comments | « components/arc/test/fake_bluetooth_instance.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #include "components/arc/test/fake_bluetooth_instance.h" 5 #include "components/arc/test/fake_bluetooth_instance.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 namespace arc { 9 namespace arc {
10 10
11 FakeBluetoothInstance::FakeBluetoothInstance() = default; 11 FakeBluetoothInstance::FakeBluetoothInstance() = default;
12 FakeBluetoothInstance::~FakeBluetoothInstance() = default; 12 FakeBluetoothInstance::~FakeBluetoothInstance() = default;
13 13
14 FakeBluetoothInstance::GattDBResult::GattDBResult( 14 FakeBluetoothInstance::GattDBResult::GattDBResult(
15 mojom::BluetoothAddressPtr&& remote_addr, 15 mojom::BluetoothAddressPtr&& remote_addr,
16 mojo::Array<mojom::BluetoothGattDBElementPtr>&& db) 16 std::vector<mojom::BluetoothGattDBElementPtr>&& db)
17 : remote_addr_(std::move(remote_addr)), db_(std::move(db)) {} 17 : remote_addr_(std::move(remote_addr)), db_(std::move(db)) {}
18 18
19 FakeBluetoothInstance::GattDBResult::~GattDBResult() {} 19 FakeBluetoothInstance::GattDBResult::~GattDBResult() {}
20 20
21 FakeBluetoothInstance::LEDeviceFoundData::LEDeviceFoundData( 21 FakeBluetoothInstance::LEDeviceFoundData::LEDeviceFoundData(
22 mojom::BluetoothAddressPtr&& addr, 22 mojom::BluetoothAddressPtr&& addr,
23 int32_t rssi, 23 int32_t rssi,
24 mojo::Array<mojom::BluetoothAdvertisingDataPtr>&& adv_data) 24 std::vector<mojom::BluetoothAdvertisingDataPtr>&& adv_data)
25 : addr_(std::move(addr)), rssi_(rssi), adv_data_(std::move(adv_data)) {} 25 : addr_(std::move(addr)), rssi_(rssi), adv_data_(std::move(adv_data)) {}
26 26
27 FakeBluetoothInstance::LEDeviceFoundData::~LEDeviceFoundData() {} 27 FakeBluetoothInstance::LEDeviceFoundData::~LEDeviceFoundData() {}
28 28
29 void FakeBluetoothInstance::Init(mojom::BluetoothHostPtr host_ptr) {} 29 void FakeBluetoothInstance::Init(mojom::BluetoothHostPtr host_ptr) {}
30 30
31 void FakeBluetoothInstance::OnAdapterProperties( 31 void FakeBluetoothInstance::OnAdapterProperties(
32 mojom::BluetoothStatus status, 32 mojom::BluetoothStatus status,
33 mojo::Array<mojom::BluetoothPropertyPtr> properties) {} 33 std::vector<mojom::BluetoothPropertyPtr> properties) {}
34 34
35 void FakeBluetoothInstance::OnRemoteDeviceProperties( 35 void FakeBluetoothInstance::OnRemoteDeviceProperties(
36 mojom::BluetoothStatus status, 36 mojom::BluetoothStatus status,
37 mojom::BluetoothAddressPtr address, 37 mojom::BluetoothAddressPtr address,
38 mojo::Array<mojom::BluetoothPropertyPtr> properties) {} 38 std::vector<mojom::BluetoothPropertyPtr> properties) {}
39 39
40 void FakeBluetoothInstance::OnDeviceFound( 40 void FakeBluetoothInstance::OnDeviceFound(
41 mojo::Array<mojom::BluetoothPropertyPtr> properties) { 41 std::vector<mojom::BluetoothPropertyPtr> properties) {
42 device_found_data_.push_back(std::move(properties)); 42 device_found_data_.push_back(std::move(properties));
43 } 43 }
44 44
45 void FakeBluetoothInstance::OnDiscoveryStateChanged( 45 void FakeBluetoothInstance::OnDiscoveryStateChanged(
46 mojom::BluetoothDiscoveryState state) {} 46 mojom::BluetoothDiscoveryState state) {}
47 47
48 void FakeBluetoothInstance::OnBondStateChanged( 48 void FakeBluetoothInstance::OnBondStateChanged(
49 mojom::BluetoothStatus status, 49 mojom::BluetoothStatus status,
50 mojom::BluetoothAddressPtr remote_addr, 50 mojom::BluetoothAddressPtr remote_addr,
51 mojom::BluetoothBondState state) {} 51 mojom::BluetoothBondState state) {}
52 52
53 void FakeBluetoothInstance::OnAclStateChanged( 53 void FakeBluetoothInstance::OnAclStateChanged(
54 mojom::BluetoothStatus status, 54 mojom::BluetoothStatus status,
55 mojom::BluetoothAddressPtr remote_addr, 55 mojom::BluetoothAddressPtr remote_addr,
56 mojom::BluetoothAclState state) {} 56 mojom::BluetoothAclState state) {}
57 57
58 void FakeBluetoothInstance::OnLEDeviceFound( 58 void FakeBluetoothInstance::OnLEDeviceFound(
59 mojom::BluetoothAddressPtr addr, 59 mojom::BluetoothAddressPtr addr,
60 int32_t rssi, 60 int32_t rssi,
61 mojo::Array<mojom::BluetoothAdvertisingDataPtr> adv_data) { 61 std::vector<mojom::BluetoothAdvertisingDataPtr> adv_data) {
62 le_device_found_data_.push_back(base::MakeUnique<LEDeviceFoundData>( 62 le_device_found_data_.push_back(base::MakeUnique<LEDeviceFoundData>(
63 std::move(addr), rssi, std::move(adv_data))); 63 std::move(addr), rssi, std::move(adv_data)));
64 } 64 }
65 65
66 void FakeBluetoothInstance::OnLEConnectionStateChange( 66 void FakeBluetoothInstance::OnLEConnectionStateChange(
67 mojom::BluetoothAddressPtr remote_addr, 67 mojom::BluetoothAddressPtr remote_addr,
68 bool connected) {} 68 bool connected) {}
69 69
70 void FakeBluetoothInstance::OnLEDeviceAddressChange( 70 void FakeBluetoothInstance::OnLEDeviceAddressChange(
71 mojom::BluetoothAddressPtr old_addr, 71 mojom::BluetoothAddressPtr old_addr,
72 mojom::BluetoothAddressPtr new_addr) {} 72 mojom::BluetoothAddressPtr new_addr) {}
73 73
74 void FakeBluetoothInstance::OnSearchComplete( 74 void FakeBluetoothInstance::OnSearchComplete(
75 mojom::BluetoothAddressPtr remote_addr, 75 mojom::BluetoothAddressPtr remote_addr,
76 mojom::BluetoothGattStatus status) {} 76 mojom::BluetoothGattStatus status) {}
77 77
78 void FakeBluetoothInstance::OnGetGattDB( 78 void FakeBluetoothInstance::OnGetGattDB(
79 mojom::BluetoothAddressPtr remote_addr, 79 mojom::BluetoothAddressPtr remote_addr,
80 mojo::Array<mojom::BluetoothGattDBElementPtr> db) { 80 std::vector<mojom::BluetoothGattDBElementPtr> db) {
81 gatt_db_result_.push_back( 81 gatt_db_result_.push_back(
82 base::MakeUnique<GattDBResult>(std::move(remote_addr), std::move(db))); 82 base::MakeUnique<GattDBResult>(std::move(remote_addr), std::move(db)));
83 } 83 }
84 84
85 void FakeBluetoothInstance::OnServicesRemoved( 85 void FakeBluetoothInstance::OnServicesRemoved(
86 mojom::BluetoothAddressPtr remote_addr, 86 mojom::BluetoothAddressPtr remote_addr,
87 uint16_t start_handle, 87 uint16_t start_handle,
88 uint16_t end_handle) {} 88 uint16_t end_handle) {}
89 89
90 void FakeBluetoothInstance::OnServicesAdded( 90 void FakeBluetoothInstance::OnServicesAdded(
91 mojom::BluetoothAddressPtr remote_addr, 91 mojom::BluetoothAddressPtr remote_addr,
92 mojo::Array<mojom::BluetoothGattDBElementPtr> db) {} 92 std::vector<mojom::BluetoothGattDBElementPtr> db) {}
93 93
94 void FakeBluetoothInstance::OnGattNotify( 94 void FakeBluetoothInstance::OnGattNotify(
95 mojom::BluetoothAddressPtr remote_addr, 95 mojom::BluetoothAddressPtr remote_addr,
96 mojom::BluetoothGattServiceIDPtr service_id, 96 mojom::BluetoothGattServiceIDPtr service_id,
97 mojom::BluetoothGattIDPtr char_id, 97 mojom::BluetoothGattIDPtr char_id,
98 bool is_notify, 98 bool is_notify,
99 mojo::Array<uint8_t> value) {} 99 const std::vector<uint8_t>& value) {}
100 100
101 void FakeBluetoothInstance::RequestGattRead( 101 void FakeBluetoothInstance::RequestGattRead(
102 mojom::BluetoothAddressPtr address, 102 mojom::BluetoothAddressPtr address,
103 int32_t attribute_handle, 103 int32_t attribute_handle,
104 int32_t offset, 104 int32_t offset,
105 bool is_long, 105 bool is_long,
106 const RequestGattReadCallback& callback) {} 106 const RequestGattReadCallback& callback) {}
107 107
108 void FakeBluetoothInstance::RequestGattWrite( 108 void FakeBluetoothInstance::RequestGattWrite(
109 mojom::BluetoothAddressPtr address, 109 mojom::BluetoothAddressPtr address,
110 int32_t attribute_handle, 110 int32_t attribute_handle,
111 int32_t offset, 111 int32_t offset,
112 mojo::Array<uint8_t> value, 112 const std::vector<uint8_t>& value,
113 const RequestGattWriteCallback& callback) {} 113 const RequestGattWriteCallback& callback) {}
114 114
115 void FakeBluetoothInstance::OnGetSdpRecords( 115 void FakeBluetoothInstance::OnGetSdpRecords(
116 mojom::BluetoothStatus status, 116 mojom::BluetoothStatus status,
117 mojom::BluetoothAddressPtr remove_addr, 117 mojom::BluetoothAddressPtr remove_addr,
118 const device::BluetoothUUID& target_uuid, 118 const device::BluetoothUUID& target_uuid,
119 mojo::Array<mojom::BluetoothSdpRecordPtr> records) {} 119 std::vector<mojom::BluetoothSdpRecordPtr> records) {}
120 120
121 } // namespace arc 121 } // namespace arc
OLDNEW
« no previous file with comments | « components/arc/test/fake_bluetooth_instance.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698