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

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

Issue 8774017: Add AUTHENTICATED session state. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | remoting/client/plugin/pepper_view.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/input_handler.h" 10 #include "remoting/client/input_handler.h"
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 rectangle_decoder_->DecodePacket( 155 rectangle_decoder_->DecodePacket(
156 packet, base::Bind(&ChromotingClient::OnPacketDone, 156 packet, base::Bind(&ChromotingClient::OnPacketDone,
157 base::Unretained(this), last_packet, decode_start)); 157 base::Unretained(this), last_packet, decode_start));
158 } 158 }
159 159
160 void ChromotingClient::OnConnectionState( 160 void ChromotingClient::OnConnectionState(
161 protocol::ConnectionToHost::State state, 161 protocol::ConnectionToHost::State state,
162 protocol::ConnectionToHost::Error error) { 162 protocol::ConnectionToHost::Error error) {
163 DCHECK(message_loop()->BelongsToCurrentThread()); 163 DCHECK(message_loop()->BelongsToCurrentThread());
164 VLOG(1) << "ChromotingClient::OnConnectionState(" << state << ")"; 164 VLOG(1) << "ChromotingClient::OnConnectionState(" << state << ")";
165 if (state == protocol::ConnectionToHost::CONNECTED || 165 if (state == protocol::ConnectionToHost::CONNECTED)
166 state == protocol::ConnectionToHost::AUTHENTICATED)
167 Initialize(); 166 Initialize();
168 view_->SetConnectionState(state, error); 167 view_->SetConnectionState(state, error);
169 } 168 }
170 169
171 base::MessageLoopProxy* ChromotingClient::message_loop() { 170 base::MessageLoopProxy* ChromotingClient::message_loop() {
172 return context_->network_message_loop(); 171 return context_->network_message_loop();
173 } 172 }
174 173
175 void ChromotingClient::OnPacketDone(bool last_packet, 174 void ChromotingClient::OnPacketDone(bool last_packet,
176 base::Time decode_start) { 175 base::Time decode_start) {
(...skipping 28 matching lines...) Expand all
205 } 204 }
206 205
207 // Initialize the decoder. 206 // Initialize the decoder.
208 rectangle_decoder_->Initialize(connection_->config()); 207 rectangle_decoder_->Initialize(connection_->config());
209 208
210 // Schedule the input handler to process the event queue. 209 // Schedule the input handler to process the event queue.
211 input_handler_->Initialize(); 210 input_handler_->Initialize();
212 } 211 }
213 212
214 } // namespace remoting 213 } // namespace remoting
OLDNEW
« no previous file with comments | « no previous file | remoting/client/plugin/pepper_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698