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

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

Issue 1365663003: Add UMA histograms for more detailed latency tracking on the CRD host. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed tests Created 5 years, 2 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
« no previous file with comments | « remoting/protocol/connection_to_client.h ('k') | remoting/protocol/host_event_dispatcher.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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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/protocol/connection_to_client.h" 5 #include "remoting/protocol/connection_to_client.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "net/base/io_buffer.h" 9 #include "net/base/io_buffer.h"
10 #include "remoting/protocol/clipboard_stub.h" 10 #include "remoting/protocol/clipboard_stub.h"
(...skipping 28 matching lines...) Expand all
39 void ConnectionToClient::Disconnect() { 39 void ConnectionToClient::Disconnect() {
40 DCHECK(CalledOnValidThread()); 40 DCHECK(CalledOnValidThread());
41 41
42 CloseChannels(); 42 CloseChannels();
43 43
44 // This should trigger OnConnectionClosed() event and this object 44 // This should trigger OnConnectionClosed() event and this object
45 // may be destroyed as the result. 45 // may be destroyed as the result.
46 session_->Close(); 46 session_->Close();
47 } 47 }
48 48
49 void ConnectionToClient::OnEventTimestamp(int64 sequence_number) { 49 void ConnectionToClient::OnInputEventReceived(int64_t timestamp) {
50 DCHECK(CalledOnValidThread()); 50 DCHECK(CalledOnValidThread());
51 handler_->OnEventTimestamp(this, sequence_number); 51 handler_->OnInputEventReceived(this, timestamp);
52 } 52 }
53 53
54 VideoStub* ConnectionToClient::video_stub() { 54 VideoStub* ConnectionToClient::video_stub() {
55 DCHECK(CalledOnValidThread()); 55 DCHECK(CalledOnValidThread());
56 return video_dispatcher_.get(); 56 return video_dispatcher_.get();
57 } 57 }
58 58
59 AudioStub* ConnectionToClient::audio_stub() { 59 AudioStub* ConnectionToClient::audio_stub() {
60 DCHECK(CalledOnValidThread()); 60 DCHECK(CalledOnValidThread());
61 return audio_writer_.get(); 61 return audio_writer_.get();
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 break; 105 break;
106 case Session::AUTHENTICATED: 106 case Session::AUTHENTICATED:
107 // Initialize channels. 107 // Initialize channels.
108 control_dispatcher_.reset(new HostControlDispatcher()); 108 control_dispatcher_.reset(new HostControlDispatcher());
109 control_dispatcher_->Init(session_.get(), 109 control_dispatcher_->Init(session_.get(),
110 session_->config().control_config(), this); 110 session_->config().control_config(), this);
111 111
112 event_dispatcher_.reset(new HostEventDispatcher()); 112 event_dispatcher_.reset(new HostEventDispatcher());
113 event_dispatcher_->Init(session_.get(), session_->config().event_config(), 113 event_dispatcher_->Init(session_.get(), session_->config().event_config(),
114 this); 114 this);
115 event_dispatcher_->set_event_timestamp_callback(base::Bind( 115 event_dispatcher_->set_on_input_event_callback(base::Bind(
116 &ConnectionToClient::OnEventTimestamp, base::Unretained(this))); 116 &ConnectionToClient::OnInputEventReceived, base::Unretained(this)));
117 117
118 video_dispatcher_.reset(new HostVideoDispatcher()); 118 video_dispatcher_.reset(new HostVideoDispatcher());
119 video_dispatcher_->Init(session_.get(), session_->config().video_config(), 119 video_dispatcher_->Init(session_.get(), session_->config().video_config(),
120 this); 120 this);
121 121
122 audio_writer_ = AudioWriter::Create(session_->config()); 122 audio_writer_ = AudioWriter::Create(session_->config());
123 if (audio_writer_.get()) { 123 if (audio_writer_.get()) {
124 audio_writer_->Init(session_.get(), session_->config().audio_config(), 124 audio_writer_->Init(session_.get(), session_->config().audio_config(),
125 this); 125 this);
126 } 126 }
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 186
187 void ConnectionToClient::CloseChannels() { 187 void ConnectionToClient::CloseChannels() {
188 control_dispatcher_.reset(); 188 control_dispatcher_.reset();
189 event_dispatcher_.reset(); 189 event_dispatcher_.reset();
190 video_dispatcher_.reset(); 190 video_dispatcher_.reset();
191 audio_writer_.reset(); 191 audio_writer_.reset();
192 } 192 }
193 193
194 } // namespace protocol 194 } // namespace protocol
195 } // namespace remoting 195 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/protocol/connection_to_client.h ('k') | remoting/protocol/host_event_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698