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

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

Issue 8604001: Move SSL layer initialization into ChannelAuthenticator implementations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 9 years, 1 month 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
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_CHANNEL_H_ 5 #ifndef REMOTING_PROTOCOL_PEPPER_CHANNEL_H_
6 #define REMOTING_PROTOCOL_PEPPER_CHANNEL_H_ 6 #define REMOTING_PROTOCOL_PEPPER_CHANNEL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/threading/non_thread_safe.h" 11 #include "base/threading/non_thread_safe.h"
12 12
13 namespace pp { 13 namespace pp {
14 class Instance; 14 class Instance;
15 } // namespace pp 15 } // namespace pp
16 16
17 namespace cricket { 17 namespace cricket {
18 class Candidate; 18 class Candidate;
19 } // namespace cricket 19 } // namespace cricket
20 20
21 namespace remoting { 21 namespace remoting {
22 namespace protocol { 22 namespace protocol {
23 23
24 class ChannelAuthenticator;
24 struct TransportConfig; 25 struct TransportConfig;
25 26
26 // Interface for stream and datagram channels used by PepperSession. 27 // Interface for stream and datagram channels used by PepperSession.
27 class PepperChannel : public base::NonThreadSafe { 28 class PepperChannel : public base::NonThreadSafe {
28 public: 29 public:
29 PepperChannel() { } 30 PepperChannel() { }
30 virtual ~PepperChannel() { } 31 virtual ~PepperChannel() { }
31 32
32 // Connect the channel using specified |config|. 33 // Connect the channel using specified |config|. Takes ownership of
34 // |authenticator|.
Wez 2011/11/22 22:29:48 nit: How is |pp_instance| used, and owned? How is
Sergey Ulanov 2011/11/23 01:23:42 There is always only one pp_instance per plugin, s
33 virtual void Connect(pp::Instance* pp_instance, 35 virtual void Connect(pp::Instance* pp_instance,
34 const TransportConfig& config, 36 const TransportConfig& config,
35 const std::string& remote_cert) = 0; 37 ChannelAuthenticator* authenticator) = 0;
36 38
37 // Adds |candidate| received from the peer. 39 // Adds |candidate| received from the peer.
38 virtual void AddRemoveCandidate(const cricket::Candidate& candidate) = 0; 40 virtual void AddRemoveCandidate(const cricket::Candidate& candidate) = 0;
39 41
40 // Name of the channel. 42 // Name of the channel.
41 virtual const std::string& name() const = 0; 43 virtual const std::string& name() const = 0;
42 44
43 // returns true if the channel is already connected 45 // returns true if the channel is already connected
44 virtual bool is_connected() const = 0; 46 virtual bool is_connected() const = 0;
45 47
46 protected: 48 protected:
47 DISALLOW_COPY_AND_ASSIGN(PepperChannel); 49 DISALLOW_COPY_AND_ASSIGN(PepperChannel);
48 }; 50 };
49 51
50 } // namespace protocol 52 } // namespace protocol
51 } // namespace remoting 53 } // namespace remoting
52 54
53 #endif // REMOTING_PROTOCOL_PEPPER_CHANNEL_H_ 55 #endif // REMOTING_PROTOCOL_PEPPER_CHANNEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698