OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "device/bluetooth/test/mock_bluetooth_adapter.h" | 5 #include "device/bluetooth/test/mock_bluetooth_adapter.h" |
6 | 6 |
| 7 #include "device/bluetooth/test/mock_bluetooth_advertisement.h" |
| 8 |
7 namespace device { | 9 namespace device { |
8 | 10 |
9 MockBluetoothAdapter::Observer::Observer() {} | 11 MockBluetoothAdapter::Observer::Observer() {} |
10 MockBluetoothAdapter::Observer::~Observer() {} | 12 MockBluetoothAdapter::Observer::~Observer() {} |
11 | 13 |
12 MockBluetoothAdapter::MockBluetoothAdapter() { | 14 MockBluetoothAdapter::MockBluetoothAdapter() { |
13 } | 15 } |
14 | 16 |
15 MockBluetoothAdapter::~MockBluetoothAdapter() {} | 17 MockBluetoothAdapter::~MockBluetoothAdapter() {} |
16 | 18 |
(...skipping 26 matching lines...) Expand all Loading... |
43 const DiscoverySessionCallback& callback, | 45 const DiscoverySessionCallback& callback, |
44 const ErrorCallback& error_callback) { | 46 const ErrorCallback& error_callback) { |
45 StartDiscoverySessionWithFilterRaw(discovery_filter.get(), callback, | 47 StartDiscoverySessionWithFilterRaw(discovery_filter.get(), callback, |
46 error_callback); | 48 error_callback); |
47 } | 49 } |
48 | 50 |
49 void MockBluetoothAdapter::RegisterAdvertisement( | 51 void MockBluetoothAdapter::RegisterAdvertisement( |
50 scoped_ptr<BluetoothAdvertisement::Data> advertisement_data, | 52 scoped_ptr<BluetoothAdvertisement::Data> advertisement_data, |
51 const CreateAdvertisementCallback& callback, | 53 const CreateAdvertisementCallback& callback, |
52 const CreateAdvertisementErrorCallback& error_callback) { | 54 const CreateAdvertisementErrorCallback& error_callback) { |
| 55 callback.Run(new MockBluetoothAdvertisement); |
53 } | 56 } |
54 | 57 |
55 } // namespace device | 58 } // namespace device |
OLD | NEW |