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

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

Issue 9567033: Cleanup error handling in the client plugin. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 8 years, 9 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/client/chromoting_view.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/chromoting_view.h" 8 #include "remoting/client/chromoting_view.h"
9 #include "remoting/client/client_context.h" 9 #include "remoting/client/client_context.h"
10 #include "remoting/client/rectangle_update_decoder.h" 10 #include "remoting/client/rectangle_update_decoder.h"
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 if (last_packet) 159 if (last_packet)
160 decode_start = base::Time::Now(); 160 decode_start = base::Time::Now();
161 161
162 rectangle_decoder_->DecodePacket( 162 rectangle_decoder_->DecodePacket(
163 packet, base::Bind(&ChromotingClient::OnPacketDone, 163 packet, base::Bind(&ChromotingClient::OnPacketDone,
164 base::Unretained(this), last_packet, decode_start)); 164 base::Unretained(this), last_packet, decode_start));
165 } 165 }
166 166
167 void ChromotingClient::OnConnectionState( 167 void ChromotingClient::OnConnectionState(
168 protocol::ConnectionToHost::State state, 168 protocol::ConnectionToHost::State state,
169 protocol::ConnectionToHost::Error error) { 169 protocol::ErrorCode error) {
170 DCHECK(message_loop()->BelongsToCurrentThread()); 170 DCHECK(message_loop()->BelongsToCurrentThread());
171 VLOG(1) << "ChromotingClient::OnConnectionState(" << state << ")"; 171 VLOG(1) << "ChromotingClient::OnConnectionState(" << state << ")";
172 if (state == protocol::ConnectionToHost::CONNECTED) 172 if (state == protocol::ConnectionToHost::CONNECTED)
173 Initialize(); 173 Initialize();
174 view_->SetConnectionState(state, error); 174 view_->SetConnectionState(state, error);
175 } 175 }
176 176
177 base::MessageLoopProxy* ChromotingClient::message_loop() { 177 base::MessageLoopProxy* ChromotingClient::message_loop() {
178 return context_->network_message_loop(); 178 return context_->network_message_loop();
179 } 179 }
(...skipping 28 matching lines...) Expand all
208 thread_proxy_.PostTask(FROM_HERE, base::Bind( 208 thread_proxy_.PostTask(FROM_HERE, base::Bind(
209 &ChromotingClient::Initialize, base::Unretained(this))); 209 &ChromotingClient::Initialize, base::Unretained(this)));
210 return; 210 return;
211 } 211 }
212 212
213 // Initialize the decoder. 213 // Initialize the decoder.
214 rectangle_decoder_->Initialize(connection_->config()); 214 rectangle_decoder_->Initialize(connection_->config());
215 } 215 }
216 216
217 } // namespace remoting 217 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/client/chromoting_client.h ('k') | remoting/client/chromoting_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698