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

Side by Side Diff: remoting/client/chromoting_client.cc

Issue 394883008: Add basic perf tests for chromoting protocol. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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
« no previous file with comments | « remoting/client/chromoting_client.h ('k') | remoting/host/client_session.cc » ('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 (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 #include "remoting/client/chromoting_client.h" 5 #include "remoting/client/chromoting_client.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "remoting/base/capabilities.h" 8 #include "remoting/base/capabilities.h"
9 #include "remoting/client/audio_decode_scheduler.h" 9 #include "remoting/client/audio_decode_scheduler.h"
10 #include "remoting/client/audio_player.h" 10 #include "remoting/client/audio_player.h"
(...skipping 23 matching lines...) Expand all
34 video_renderer_(video_renderer), 34 video_renderer_(video_renderer),
35 host_capabilities_received_(false) { 35 host_capabilities_received_(false) {
36 if (audio_player) { 36 if (audio_player) {
37 audio_decode_scheduler_.reset(new AudioDecodeScheduler( 37 audio_decode_scheduler_.reset(new AudioDecodeScheduler(
38 client_context->main_task_runner(), 38 client_context->main_task_runner(),
39 client_context->audio_decode_task_runner(), 39 client_context->audio_decode_task_runner(),
40 audio_player.Pass())); 40 audio_player.Pass()));
41 } 41 }
42 } 42 }
43 43
44 ChromotingClient::~ChromotingClient() { 44 ChromotingClient::~ChromotingClient() {}
45
46 void ChromotingClient::SetProtocolConfigForTests(
47 scoped_ptr<protocol::CandidateSessionConfig> config) {
48 connection_.set_candidate_config(config.Pass());
45 } 49 }
46 50
47 void ChromotingClient::Start( 51 void ChromotingClient::Start(
48 SignalStrategy* signal_strategy, 52 SignalStrategy* signal_strategy,
49 scoped_ptr<protocol::Authenticator> authenticator, 53 scoped_ptr<protocol::Authenticator> authenticator,
50 scoped_ptr<protocol::TransportFactory> transport_factory, 54 scoped_ptr<protocol::TransportFactory> transport_factory,
51 const std::string& host_jid, 55 const std::string& host_jid,
52 const std::string& capabilities) { 56 const std::string& capabilities) {
53 DCHECK(task_runner_->BelongsToCurrentThread()); 57 DCHECK(task_runner_->BelongsToCurrentThread());
54 58
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 if (connection_.config().SupportsCapabilities()) { 168 if (connection_.config().SupportsCapabilities()) {
165 VLOG(1) << "Client capabilities: " << local_capabilities_; 169 VLOG(1) << "Client capabilities: " << local_capabilities_;
166 170
167 protocol::Capabilities capabilities; 171 protocol::Capabilities capabilities;
168 capabilities.set_capabilities(local_capabilities_); 172 capabilities.set_capabilities(local_capabilities_);
169 connection_.host_stub()->SetCapabilities(capabilities); 173 connection_.host_stub()->SetCapabilities(capabilities);
170 } 174 }
171 } 175 }
172 176
173 } // namespace remoting 177 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/client/chromoting_client.h ('k') | remoting/host/client_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698