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

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

Issue 9325036: Add abstract interfaces for the transport layer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef REMOTING_PROTOCOL_PEPPER_CHANNEL_H_
6 #define REMOTING_PROTOCOL_PEPPER_CHANNEL_H_
7
8 #include <string>
9
10 #include "base/basictypes.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "base/threading/non_thread_safe.h"
13
14 namespace pp {
15 class Instance;
16 } // namespace pp
17
18 namespace cricket {
19 class Candidate;
20 } // namespace cricket
21
22 namespace remoting {
23 namespace protocol {
24
25 class ChannelAuthenticator;
26 struct TransportConfig;
27
28 // Interface for stream and datagram channels used by PepperSession.
29 class PepperChannel : public base::NonThreadSafe {
30 public:
31 PepperChannel() { }
32 virtual ~PepperChannel() { }
33
34 // Connect the channel using specified |config|. The specified
35 // |authenticator| is used to authenticate the channel.
36 virtual void Connect(pp::Instance* pp_instance,
37 const TransportConfig& config,
38 scoped_ptr<ChannelAuthenticator> authenticator) = 0;
39
40 // Adds |candidate| received from the peer.
41 virtual void AddRemoteCandidate(const cricket::Candidate& candidate) = 0;
42
43 // Name of the channel.
44 virtual const std::string& name() const = 0;
45
46 // Returns true if the channel is already connected.
47 virtual bool is_connected() const = 0;
48
49 protected:
50 DISALLOW_COPY_AND_ASSIGN(PepperChannel);
51 };
52
53 } // namespace protocol
54 } // namespace remoting
55
56 #endif // REMOTING_PROTOCOL_PEPPER_CHANNEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698