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

Side by Side Diff: remoting/protocol/jingle_session.cc

Issue 7778022: Chromoting protocol implementation based on P2P Transport API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 9 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 | « remoting/base/constants.cc ('k') | remoting/protocol/pepper_channel.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/jingle_session.h" 5 #include "remoting/protocol/jingle_session.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop_proxy.h" 8 #include "base/message_loop_proxy.h"
9 #include "base/rand_util.h" 9 #include "base/rand_util.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
11 #include "crypto/hmac.h" 11 #include "crypto/hmac.h"
12 #include "crypto/rsa_private_key.h" 12 #include "crypto/rsa_private_key.h"
13 #include "net/base/net_errors.h" 13 #include "net/base/net_errors.h"
14 #include "net/socket/stream_socket.h" 14 #include "net/socket/stream_socket.h"
15 #include "remoting/base/constants.h" 15 #include "remoting/base/constants.h"
16 #include "remoting/protocol/jingle_datagram_connector.h" 16 #include "remoting/protocol/jingle_datagram_connector.h"
17 #include "remoting/protocol/jingle_session_manager.h" 17 #include "remoting/protocol/jingle_session_manager.h"
18 #include "remoting/protocol/jingle_stream_connector.h" 18 #include "remoting/protocol/jingle_stream_connector.h"
19 #include "third_party/libjingle/source/talk/base/thread.h" 19 #include "third_party/libjingle/source/talk/base/thread.h"
20 #include "third_party/libjingle/source/talk/p2p/base/p2ptransportchannel.h" 20 #include "third_party/libjingle/source/talk/p2p/base/p2ptransportchannel.h"
21 #include "third_party/libjingle/source/talk/p2p/base/session.h" 21 #include "third_party/libjingle/source/talk/p2p/base/session.h"
22 #include "third_party/libjingle/source/talk/p2p/base/transport.h" 22 #include "third_party/libjingle/source/talk/p2p/base/transport.h"
23 23
24 using cricket::BaseSession; 24 using cricket::BaseSession;
25 25
26 namespace remoting { 26 namespace remoting {
27 namespace protocol { 27 namespace protocol {
28 28
29 namespace {
30
31 const char kControlChannelName[] = "control";
32 const char kEventChannelName[] = "event";
33
34 } // namespace
35
36 // static 29 // static
37 JingleSession* JingleSession::CreateClientSession( 30 JingleSession* JingleSession::CreateClientSession(
38 JingleSessionManager* manager, const std::string& host_public_key) { 31 JingleSessionManager* manager, const std::string& host_public_key) {
39 return new JingleSession(manager, "", NULL, host_public_key); 32 return new JingleSession(manager, "", NULL, host_public_key);
40 } 33 }
41 34
42 // static 35 // static
43 JingleSession* JingleSession::CreateServerSession( 36 JingleSession* JingleSession::CreateServerSession(
44 JingleSessionManager* manager, 37 JingleSessionManager* manager,
45 const std::string& certificate, 38 const std::string& certificate,
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 DCHECK_NE(state_, FAILED); 459 DCHECK_NE(state_, FAILED);
467 460
468 state_ = new_state; 461 state_ = new_state;
469 if (state_change_callback_.get()) 462 if (state_change_callback_.get())
470 state_change_callback_->Run(new_state); 463 state_change_callback_->Run(new_state);
471 } 464 }
472 } 465 }
473 466
474 } // namespace protocol 467 } // namespace protocol
475 } // namespace remoting 468 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/base/constants.cc ('k') | remoting/protocol/pepper_channel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698