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

Side by Side Diff: remoting/protocol/fake_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/protocol/fake_session.h ('k') | remoting/protocol/host_control_sender.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) 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/protocol/fake_session.h" 5 #include "remoting/protocol/fake_session.h"
6 6
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "net/base/io_buffer.h" 8 #include "net/base/io_buffer.h"
9 #include "net/base/net_errors.h" 9 #include "net/base/net_errors.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 FakeSession::~FakeSession() { } 213 FakeSession::~FakeSession() { }
214 214
215 FakeSocket* FakeSession::GetStreamChannel(const std::string& name) { 215 FakeSocket* FakeSession::GetStreamChannel(const std::string& name) {
216 return stream_channels_[name]; 216 return stream_channels_[name];
217 } 217 }
218 218
219 FakeUdpSocket* FakeSession::GetDatagramChannel(const std::string& name) { 219 FakeUdpSocket* FakeSession::GetDatagramChannel(const std::string& name) {
220 return datagram_channels_[name]; 220 return datagram_channels_[name];
221 } 221 }
222 222
223 void FakeSession::SetStateChangeCallback(StateChangeCallback* callback) { 223 void FakeSession::SetStateChangeCallback(const StateChangeCallback& callback) {
224 callback_.reset(callback); 224 callback_ = callback;
225 } 225 }
226 226
227 Session::Error FakeSession::error() { 227 Session::Error FakeSession::error() {
228 return error_; 228 return error_;
229 } 229 }
230 230
231 void FakeSession::CreateStreamChannel( 231 void FakeSession::CreateStreamChannel(
232 const std::string& name, const StreamChannelCallback& callback) { 232 const std::string& name, const StreamChannelCallback& callback) {
233 FakeSocket* channel = new FakeSocket(); 233 FakeSocket* channel = new FakeSocket();
234 stream_channels_[name] = channel; 234 stream_channels_[name] = channel;
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 const std::string& FakeSession::shared_secret() { 289 const std::string& FakeSession::shared_secret() {
290 return shared_secret_; 290 return shared_secret_;
291 } 291 }
292 292
293 void FakeSession::Close() { 293 void FakeSession::Close() {
294 closed_ = true; 294 closed_ = true;
295 } 295 }
296 296
297 } // namespace protocol 297 } // namespace protocol
298 } // namespace remoting 298 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/protocol/fake_session.h ('k') | remoting/protocol/host_control_sender.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698