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

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

Issue 10879085: Cleanup RectangleUpdateDecoder and VideoStub (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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 | « no previous file | remoting/client/rectangle_update_decoder.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 (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/client/audio_decode_scheduler.h" 8 #include "remoting/client/audio_decode_scheduler.h"
9 #include "remoting/client/audio_player.h" 9 #include "remoting/client/audio_player.h"
10 #include "remoting/client/client_context.h" 10 #include "remoting/client/client_context.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 connection_->Connect(xmpp_proxy, config_.local_jid, config_.host_jid, 60 connection_->Connect(xmpp_proxy, config_.local_jid, config_.host_jid,
61 config_.host_public_key, transport_factory.Pass(), 61 config_.host_public_key, transport_factory.Pass(),
62 authenticator.Pass(), this, this, this, 62 authenticator.Pass(), this, this, this,
63 rectangle_decoder_, 63 rectangle_decoder_,
64 audio_decode_scheduler_.get()); 64 audio_decode_scheduler_.get());
65 } 65 }
66 66
67 void ChromotingClient::Stop(const base::Closure& shutdown_task) { 67 void ChromotingClient::Stop(const base::Closure& shutdown_task) {
68 DCHECK(task_runner_->BelongsToCurrentThread()); 68 DCHECK(task_runner_->BelongsToCurrentThread());
69 69
70 // Drop all pending packets.
71 rectangle_decoder_->DropAllPackets();
72
73 connection_->Disconnect(base::Bind(&ChromotingClient::OnDisconnected, 70 connection_->Disconnect(base::Bind(&ChromotingClient::OnDisconnected,
74 weak_ptr_, shutdown_task)); 71 weak_ptr_, shutdown_task));
75 } 72 }
76 73
77 void ChromotingClient::OnDisconnected(const base::Closure& shutdown_task) { 74 void ChromotingClient::OnDisconnected(const base::Closure& shutdown_task) {
78 shutdown_task.Run(); 75 shutdown_task.Run();
79 } 76 }
80 77
81 ChromotingStats* ChromotingClient::GetStats() { 78 ChromotingStats* ChromotingClient::GetStats() {
82 DCHECK(task_runner_->BelongsToCurrentThread()); 79 DCHECK(task_runner_->BelongsToCurrentThread());
(...skipping 29 matching lines...) Expand all
112 void ChromotingClient::Initialize() { 109 void ChromotingClient::Initialize() {
113 DCHECK(task_runner_->BelongsToCurrentThread()); 110 DCHECK(task_runner_->BelongsToCurrentThread());
114 111
115 // Initialize the decoder. 112 // Initialize the decoder.
116 rectangle_decoder_->Initialize(connection_->config()); 113 rectangle_decoder_->Initialize(connection_->config());
117 if (connection_->config().is_audio_enabled()) 114 if (connection_->config().is_audio_enabled())
118 audio_decode_scheduler_->Initialize(connection_->config()); 115 audio_decode_scheduler_->Initialize(connection_->config());
119 } 116 }
120 117
121 } // namespace remoting 118 } // namespace remoting
OLDNEW
« no previous file with comments | « no previous file | remoting/client/rectangle_update_decoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698