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

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

Issue 1520323007: Simplify ConnectionToHost interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@sm_cleanup
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
« no previous file with comments | « remoting/protocol/fake_connection_to_host.h ('k') | remoting/test/test_chromoting_client.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 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 "remoting/protocol/fake_connection_to_host.h" 5 #include "remoting/protocol/fake_connection_to_host.h"
6 6
7 #include "remoting/protocol/authenticator.h" 7 #include "remoting/protocol/authenticator.h"
8 #include "remoting/protocol/transport_context.h" 8 #include "remoting/protocol/transport_context.h"
9 9
10 namespace remoting { 10 namespace remoting {
11 namespace test { 11 namespace test {
12 12
13 FakeConnectionToHost::FakeConnectionToHost() 13 FakeConnectionToHost::FakeConnectionToHost()
14 : state_(INITIALIZING), 14 : session_config_(protocol::SessionConfig::ForTest()) {}
15 session_config_(protocol::SessionConfig::ForTest()) { 15 FakeConnectionToHost::~FakeConnectionToHost() {}
16 }
17 16
18 FakeConnectionToHost::~FakeConnectionToHost() { 17 void FakeConnectionToHost::set_client_stub(protocol::ClientStub* client_stub) {}
19 }
20
21 void FakeConnectionToHost::set_candidate_config(
22 scoped_ptr<protocol::CandidateSessionConfig> config) {
23 }
24
25 void FakeConnectionToHost::set_client_stub(protocol::ClientStub* client_stub) {
26 }
27 18
28 void FakeConnectionToHost::set_clipboard_stub( 19 void FakeConnectionToHost::set_clipboard_stub(
29 protocol::ClipboardStub* clipboard_stub) { 20 protocol::ClipboardStub* clipboard_stub) {}
30 }
31 21
32 void FakeConnectionToHost::set_video_stub(protocol::VideoStub* video_stub) { 22 void FakeConnectionToHost::set_video_stub(protocol::VideoStub* video_stub) {}
33 }
34 23
35 void FakeConnectionToHost::set_audio_stub(protocol::AudioStub* audio_stub) { 24 void FakeConnectionToHost::set_audio_stub(protocol::AudioStub* audio_stub) {}
36 }
37 25
38 void FakeConnectionToHost::Connect( 26 void FakeConnectionToHost::Connect(scoped_ptr<protocol::Session> session,
39 SignalStrategy* signal_strategy, 27 HostEventCallback* event_callback) {
40 scoped_refptr<protocol::TransportContext> transport_context,
41 scoped_ptr<protocol::Authenticator> authenticator,
42 const std::string& host_jid,
43 HostEventCallback* event_callback) {
44 DCHECK(event_callback); 28 DCHECK(event_callback);
45 29
46 event_callback_ = event_callback; 30 event_callback_ = event_callback;
47 31
48 SetState(CONNECTING, protocol::OK); 32 SetState(CONNECTING, protocol::OK);
49 } 33 }
50 34
51 void FakeConnectionToHost::SignalStateChange(protocol::Session::State state, 35 void FakeConnectionToHost::SignalStateChange(protocol::Session::State state,
52 protocol::ErrorCode error) { 36 protocol::ErrorCode error) {
53 DCHECK(event_callback_); 37 DCHECK(event_callback_);
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 DCHECK(state == FAILED || error == protocol::OK); 95 DCHECK(state == FAILED || error == protocol::OK);
112 96
113 if (state != state_) { 97 if (state != state_) {
114 state_ = state; 98 state_ = state;
115 event_callback_->OnConnectionState(state_, error); 99 event_callback_->OnConnectionState(state_, error);
116 } 100 }
117 } 101 }
118 102
119 } // namespace test 103 } // namespace test
120 } // namespace remoting 104 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/protocol/fake_connection_to_host.h ('k') | remoting/test/test_chromoting_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698