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

Side by Side Diff: remoting/protocol/pepper_session.h

Issue 8046018: Parse termination reason and propagate the error to the Session interface. (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/jingle_session_manager.cc ('k') | remoting/protocol/pepper_session.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 #ifndef REMOTING_PROTOCOL_PEPPER_SESSION_H_ 5 #ifndef REMOTING_PROTOCOL_PEPPER_SESSION_H_
6 #define REMOTING_PROTOCOL_PEPPER_SESSION_H_ 6 #define REMOTING_PROTOCOL_PEPPER_SESSION_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 25 matching lines...) Expand all
36 36
37 class PepperChannel; 37 class PepperChannel;
38 class PepperSessionManager; 38 class PepperSessionManager;
39 class SocketWrapper; 39 class SocketWrapper;
40 40
41 // Implements the protocol::Session interface using the Pepper P2P 41 // Implements the protocol::Session interface using the Pepper P2P
42 // Transport API. Created by PepperSessionManager for incoming and 42 // Transport API. Created by PepperSessionManager for incoming and
43 // outgoing connections. 43 // outgoing connections.
44 class PepperSession : public Session { 44 class PepperSession : public Session {
45 public: 45 public:
46 // TODO(sergeyu): Move this type and error() method to the Session
47 // interface.
48 enum Error {
49 ERROR_NO_ERROR = 0,
50 ERROR_PEER_IS_OFFLINE,
51 ERROR_SESSION_REJECTED,
52 ERROR_INCOMPATIBLE_PROTOCOL,
53 ERROR_CHANNEL_CONNECTION_FAILURE,
54 };
55
56 virtual ~PepperSession(); 46 virtual ~PepperSession();
57 47
58 Error error();
59
60 // Session interface. 48 // Session interface.
61 virtual void SetStateChangeCallback(StateChangeCallback* callback) OVERRIDE; 49 virtual void SetStateChangeCallback(StateChangeCallback* callback) OVERRIDE;
50 virtual Error error() OVERRIDE;
62 virtual void CreateStreamChannel( 51 virtual void CreateStreamChannel(
63 const std::string& name, 52 const std::string& name,
64 const StreamChannelCallback& callback) OVERRIDE; 53 const StreamChannelCallback& callback) OVERRIDE;
65 virtual void CreateDatagramChannel( 54 virtual void CreateDatagramChannel(
66 const std::string& name, 55 const std::string& name,
67 const DatagramChannelCallback& callback) OVERRIDE; 56 const DatagramChannelCallback& callback) OVERRIDE;
68 virtual net::Socket* control_channel() OVERRIDE; 57 virtual net::Socket* control_channel() OVERRIDE;
69 virtual net::Socket* event_channel() OVERRIDE; 58 virtual net::Socket* event_channel() OVERRIDE;
70 virtual const std::string& jid() OVERRIDE; 59 virtual const std::string& jid() OVERRIDE;
71 virtual const CandidateSessionConfig* candidate_config() OVERRIDE; 60 virtual const CandidateSessionConfig* candidate_config() OVERRIDE;
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 base::OneShotTimer<PepperSession> transport_infos_timer_; 147 base::OneShotTimer<PepperSession> transport_infos_timer_;
159 std::list<cricket::Candidate> pending_candidates_; 148 std::list<cricket::Candidate> pending_candidates_;
160 149
161 DISALLOW_COPY_AND_ASSIGN(PepperSession); 150 DISALLOW_COPY_AND_ASSIGN(PepperSession);
162 }; 151 };
163 152
164 } // namespace protocol 153 } // namespace protocol
165 } // namespace remoting 154 } // namespace remoting
166 155
167 #endif // REMOTING_PROTOCOL_PEPPER_SESSION_H_ 156 #endif // REMOTING_PROTOCOL_PEPPER_SESSION_H_
OLDNEW
« no previous file with comments | « remoting/protocol/jingle_session_manager.cc ('k') | remoting/protocol/pepper_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698