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 #ifndef REMOTING_PROTOCOL_PROTOCOL_MOCK_OBJECTS_H_ | 5 #ifndef REMOTING_PROTOCOL_PROTOCOL_MOCK_OBJECTS_H_ |
6 #define REMOTING_PROTOCOL_PROTOCOL_MOCK_OBJECTS_H_ | 6 #define REMOTING_PROTOCOL_PROTOCOL_MOCK_OBJECTS_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 24 matching lines...) Expand all Loading... |
35 MockConnectionToClient(Session* session, | 35 MockConnectionToClient(Session* session, |
36 HostStub* host_stub); | 36 HostStub* host_stub); |
37 virtual ~MockConnectionToClient(); | 37 virtual ~MockConnectionToClient(); |
38 | 38 |
39 MOCK_METHOD1(Init, void(Session* session)); | 39 MOCK_METHOD1(Init, void(Session* session)); |
40 MOCK_METHOD0(video_stub, VideoStub*()); | 40 MOCK_METHOD0(video_stub, VideoStub*()); |
41 MOCK_METHOD0(client_stub, ClientStub*()); | 41 MOCK_METHOD0(client_stub, ClientStub*()); |
42 MOCK_METHOD0(session, Session*()); | 42 MOCK_METHOD0(session, Session*()); |
43 MOCK_METHOD0(Disconnect, void()); | 43 MOCK_METHOD0(Disconnect, void()); |
44 | 44 |
| 45 void set_clipboard_stub(ClipboardStub* clipboard_stub) override { |
| 46 clipboard_stub_ = clipboard_stub; |
| 47 } |
| 48 void set_host_stub(HostStub* host_stub) override { host_stub_ = host_stub; } |
| 49 void set_input_stub(InputStub* input_stub) override { |
| 50 input_stub_ = input_stub; |
| 51 } |
| 52 |
| 53 ClipboardStub* clipboard_stub() { return clipboard_stub_; } |
| 54 HostStub* host_stub() { return host_stub_; } |
| 55 InputStub* input_stub() { return input_stub_; } |
| 56 |
45 private: | 57 private: |
| 58 ClipboardStub* clipboard_stub_; |
| 59 HostStub* host_stub_; |
| 60 InputStub* input_stub_; |
| 61 |
46 DISALLOW_COPY_AND_ASSIGN(MockConnectionToClient); | 62 DISALLOW_COPY_AND_ASSIGN(MockConnectionToClient); |
47 }; | 63 }; |
48 | 64 |
49 class MockConnectionToClientEventHandler : | 65 class MockConnectionToClientEventHandler : |
50 public ConnectionToClient::EventHandler { | 66 public ConnectionToClient::EventHandler { |
51 public: | 67 public: |
52 MockConnectionToClientEventHandler(); | 68 MockConnectionToClientEventHandler(); |
53 virtual ~MockConnectionToClientEventHandler(); | 69 virtual ~MockConnectionToClientEventHandler(); |
54 | 70 |
55 MOCK_METHOD1(OnConnectionAuthenticating, | 71 MOCK_METHOD1(OnConnectionAuthenticating, |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 // Runs tasks synchronously instead of posting them to |task_runner|. | 270 // Runs tasks synchronously instead of posting them to |task_runner|. |
255 void PostTask(const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, | 271 void PostTask(const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, |
256 const tracked_objects::Location& from_here, | 272 const tracked_objects::Location& from_here, |
257 const base::Closure& task) override; | 273 const base::Closure& task) override; |
258 }; | 274 }; |
259 | 275 |
260 } // namespace protocol | 276 } // namespace protocol |
261 } // namespace remoting | 277 } // namespace remoting |
262 | 278 |
263 #endif // REMOTING_PROTOCOL_PROTOCOL_MOCK_OBJECTS_H_ | 279 #endif // REMOTING_PROTOCOL_PROTOCOL_MOCK_OBJECTS_H_ |
OLD | NEW |