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

Side by Side Diff: remoting/host/client_session.cc

Issue 8116021: Switch remoting/protocol to new callbacks (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 9 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 | Annotate | Revision Log
« no previous file with comments | « remoting/host/client_session.h ('k') | remoting/host/client_session_unittest.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/host/client_session.h" 5 #include "remoting/host/client_session.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/task.h" 9 #include "base/task.h"
10 #include "remoting/host/capturer.h" 10 #include "remoting/host/capturer.h"
(...skipping 30 matching lines...) Expand all
41 capturer_(capturer), 41 capturer_(capturer),
42 authenticated_(false), 42 authenticated_(false),
43 awaiting_continue_approval_(false), 43 awaiting_continue_approval_(false),
44 remote_mouse_button_state_(0) { 44 remote_mouse_button_state_(0) {
45 } 45 }
46 46
47 ClientSession::~ClientSession() { 47 ClientSession::~ClientSession() {
48 } 48 }
49 49
50 void ClientSession::BeginSessionRequest( 50 void ClientSession::BeginSessionRequest(
51 const protocol::LocalLoginCredentials* credentials, Task* done) { 51 const protocol::LocalLoginCredentials* credentials,
52 const base::Closure& done) {
52 DCHECK(event_handler_); 53 DCHECK(event_handler_);
53 54
54 base::ScopedTaskRunner done_runner(done); 55 base::ScopedClosureRunner done_runner(done);
55 56
56 bool success = false; 57 bool success = false;
57 switch (credentials->type()) { 58 switch (credentials->type()) {
58 case protocol::PASSWORD: 59 case protocol::PASSWORD:
59 success = user_authenticator_->Authenticate(credentials->username(), 60 success = user_authenticator_->Authenticate(credentials->username(),
60 credentials->credential()); 61 credentials->credential());
61 break; 62 break;
62 63
63 default: 64 default:
64 LOG(ERROR) << "Invalid credentials type " << credentials->type(); 65 LOG(ERROR) << "Invalid credentials type " << credentials->type();
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 mouse.set_y(remote_mouse_pos_.y()); 217 mouse.set_y(remote_mouse_pos_.y());
217 mouse.set_button((MouseEvent::MouseButton)i); 218 mouse.set_button((MouseEvent::MouseButton)i);
218 mouse.set_button_down(false); 219 mouse.set_button_down(false);
219 input_stub_->InjectMouseEvent(mouse); 220 input_stub_->InjectMouseEvent(mouse);
220 } 221 }
221 } 222 }
222 remote_mouse_button_state_ = 0; 223 remote_mouse_button_state_ = 0;
223 } 224 }
224 225
225 } // namespace remoting 226 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/client_session.h ('k') | remoting/host/client_session_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698