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

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

Issue 1156573005: bluetooth: Browser-side implementation of getCharacteristic (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bluetooth-get-primary-service-initial
Patch Set: Fix histograms.xml and bad_messages.h merge conflict Created 5 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 (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 #ifndef DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_ADAPTER_H_ 5 #ifndef DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_ADAPTER_H_
6 #define DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_ADAPTER_H_ 6 #define DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_ADAPTER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 void(const BluetoothAudioSink::Options& options, 95 void(const BluetoothAudioSink::Options& options,
96 const AcquiredCallback& callback, 96 const AcquiredCallback& callback,
97 const BluetoothAudioSink::ErrorCallback& error_callback)); 97 const BluetoothAudioSink::ErrorCallback& error_callback));
98 98
99 void StartDiscoverySessionWithFilter( 99 void StartDiscoverySessionWithFilter(
100 scoped_ptr<BluetoothDiscoveryFilter> discovery_filter, 100 scoped_ptr<BluetoothDiscoveryFilter> discovery_filter,
101 const DiscoverySessionCallback& callback, 101 const DiscoverySessionCallback& callback,
102 const ErrorCallback& error_callback); 102 const ErrorCallback& error_callback);
103 103
104 // BluetoothAdapter is supposed to manage the lifetime of BluetoothDevices. 104 // BluetoothAdapter is supposed to manage the lifetime of BluetoothDevices.
105 // This methods takes ownership of the BluetoothDevices. This is only for 105 // This method takes ownership of the MockBluetoothDevice. This is only for
106 // convenience as far testing is concerned and it's possible to write test 106 // convenience as far testing is concerned and it's possible to write test
107 // cases without using these functions. 107 // cases without using these functions.
108 void AddMockDevice(scoped_ptr<MockBluetoothDevice> mock_device); 108 void AddMockDevice(scoped_ptr<MockBluetoothDevice> mock_device);
109 BluetoothAdapter::ConstDeviceList GetConstMockDevices(); 109 BluetoothAdapter::ConstDeviceList GetConstMockDevices();
110 BluetoothAdapter::DeviceList GetMockDevices(); 110 BluetoothAdapter::DeviceList GetMockDevices();
111 111
112 protected: 112 protected:
113 void AddDiscoverySession(BluetoothDiscoveryFilter* discovery_filter, 113 void AddDiscoverySession(BluetoothDiscoveryFilter* discovery_filter,
114 const base::Closure& callback, 114 const base::Closure& callback,
115 const ErrorCallback& error_callback) override; 115 const ErrorCallback& error_callback) override;
(...skipping 11 matching lines...) Expand all
127 127
128 MOCK_METHOD1(RemovePairingDelegateInternal, 128 MOCK_METHOD1(RemovePairingDelegateInternal,
129 void(BluetoothDevice::PairingDelegate* pairing_delegate)); 129 void(BluetoothDevice::PairingDelegate* pairing_delegate));
130 130
131 ScopedVector<MockBluetoothDevice> mock_devices_; 131 ScopedVector<MockBluetoothDevice> mock_devices_;
132 }; 132 };
133 133
134 } // namespace device 134 } // namespace device
135 135
136 #endif // DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_ADAPTER_H_ 136 #endif // DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_ADAPTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698