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

Side by Side Diff: trunk/src/device/bluetooth/test/mock_bluetooth_socket.h

Issue 227493006: Revert 262175 "* Replace "read" method with onReceiveXxx events." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 8 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 | Annotate | Revision Log
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_SOCKET_H_ 5 #ifndef DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_SOCKET_H_
6 #define DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_SOCKET_H_ 6 #define DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_SOCKET_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "device/bluetooth/bluetooth_socket.h" 10 #include "device/bluetooth/bluetooth_socket.h"
11 #include "net/base/io_buffer.h"
12 #include "testing/gmock/include/gmock/gmock.h" 11 #include "testing/gmock/include/gmock/gmock.h"
13 12
13 namespace net {
14
15 class DrainableIOBuffer;
16 class GrowableIOBuffer;
17
18 } // namespace net
19
14 namespace device { 20 namespace device {
15 21
16 class MockBluetoothSocket : public BluetoothSocket { 22 class MockBluetoothSocket : public BluetoothSocket {
17 public: 23 public:
18 MockBluetoothSocket(); 24 MockBluetoothSocket();
19 MOCK_METHOD0(Close, void()); 25 MOCK_METHOD1(Receive, bool(net::GrowableIOBuffer*));
20 MOCK_METHOD1(Disconnect, void(const base::Closure& callback)); 26 MOCK_METHOD1(Send, bool(net::DrainableIOBuffer*));
21 MOCK_METHOD3(Receive, 27 MOCK_CONST_METHOD0(GetLastErrorMessage, std::string());
22 void(int count,
23 const ReceiveCompletionCallback& success_callback,
24 const ReceiveErrorCompletionCallback& error_callback));
25 MOCK_METHOD4(Send,
26 void(scoped_refptr<net::IOBuffer> buffer,
27 int buffer_size,
28 const SendCompletionCallback& success_callback,
29 const ErrorCompletionCallback& error_callback));
30 28
31 protected: 29 protected:
32 virtual ~MockBluetoothSocket(); 30 virtual ~MockBluetoothSocket();
33 }; 31 };
34 32
35 } // namespace device 33 } // namespace device
36 34
37 #endif // DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_SOCKET_H_ 35 #endif // DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_SOCKET_H_
OLDNEW
« no previous file with comments | « trunk/src/device/bluetooth/test/mock_bluetooth_device.h ('k') | trunk/src/extensions/browser/api/api_resource_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698