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

Side by Side Diff: remoting/protocol/fake_connection_to_client.cc

Issue 1463293002: Replace MockConnectionToClient with FakeConnectionToClient (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove_RejectAuthenticatingClient
Patch Set: Created 5 years 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
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "remoting/protocol/fake_connection_to_client.h"
6
7 #include "remoting/protocol/session.h"
8
9 namespace remoting {
10 namespace protocol {
11
12 FakeConnectionToClient::FakeConnectionToClient(scoped_ptr<Session> session)
13 : session_(session.Pass()) {}
14
15 FakeConnectionToClient::~FakeConnectionToClient() {}
16
17 void FakeConnectionToClient::SetEventHandler(EventHandler* event_handler) {
18 event_handler_ = event_handler;
19 }
20
21 VideoStub* FakeConnectionToClient::video_stub() {
22 return video_stub_;
23 }
24
25 AudioStub* FakeConnectionToClient::audio_stub() {
26 return audio_stub_;
27 }
28
29 ClientStub* FakeConnectionToClient::client_stub() {
30 return client_stub_;
31 }
32
33 void FakeConnectionToClient::Disconnect(ErrorCode disconnect_error) {
34 CHECK(is_connected_);
35
36 is_connected_ = false;
37 disconnect_error_ = disconnect_error;
38 if (event_handler_)
39 event_handler_->OnConnectionClosed(this, disconnect_error_);
40 }
41
42 Session* FakeConnectionToClient::session() {
43 return session_.get();
44 }
45
46 void FakeConnectionToClient::OnInputEventReceived(int64_t timestamp) {}
47
48 void FakeConnectionToClient::set_clipboard_stub(ClipboardStub* clipboard_stub) {
49 clipboard_stub_ = clipboard_stub;
50 }
51
52 void FakeConnectionToClient::set_host_stub(HostStub* host_stub) {
53 host_stub_ = host_stub;
54 }
55
56 void FakeConnectionToClient::set_input_stub(InputStub* input_stub) {
57 input_stub_ = input_stub;
58 }
59
60 void FakeConnectionToClient::set_video_feedback_stub(
61 VideoFeedbackStub* video_feedback_stub) {
62 video_feedback_stub_ = video_feedback_stub;
63 }
64
65 } // namespace protocol
66 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/protocol/fake_connection_to_client.h ('k') | remoting/protocol/protocol_mock_objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698