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

Unified Diff: remoting/protocol/pepper_channel.h

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, 4 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 side-by-side diff with in-line comments
Download patch
Index: remoting/protocol/pepper_channel.h
diff --git a/remoting/protocol/pepper_channel.h b/remoting/protocol/pepper_channel.h
new file mode 100644
index 0000000000000000000000000000000000000000..8c58b20d6d492237ae7aacc1b91ad8a829227c4e
--- /dev/null
+++ b/remoting/protocol/pepper_channel.h
@@ -0,0 +1,55 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef REMOTING_PROTOCOL_PEPPER_CHANNEL_H_
+#define REMOTING_PROTOCOL_PEPPER_CHANNEL_H_
+
+#include <string>
+
+#include "base/basictypes.h"
+#include "base/threading/non_thread_safe.h"
+
+namespace pp {
+class Instance;
+} // namespace pp
+
+namespace crypto {
+class RSAPrivateKey;
+} // namespace crypto
+
+namespace cricket {
+class Candidate;
+} // namespace cricket
+
+namespace remoting {
+namespace protocol {
+
+class PepperChannel : public base::NonThreadSafe {
+ public:
+ struct TransportConfig {
Wez 2011/09/01 01:08:29 nit: Consider moving this out to be PepperChannelC
Sergey Ulanov 2011/09/08 00:48:36 Moved it of PepperChannel, but didn't rename it. I
+ TransportConfig();
+ ~TransportConfig();
+
+ bool nat_traversal;
+ std::string stun_server;
+ std::string relay_server;
+ std::string relay_token;
+ };
+
+ PepperChannel() { }
+ virtual ~PepperChannel() { }
+
+ virtual void Connect(const TransportConfig& config,
+ const std::string& remote_cert) = 0;
+ virtual void AddRemoveCandidate(const cricket::Candidate& candidate) = 0;
+ virtual const std::string& name() = 0;
Wez 2011/09/01 01:08:29 Some comments to explain these APIs would be handy
Sergey Ulanov 2011/09/08 00:48:36 Done.
+
+ protected:
+ DISALLOW_COPY_AND_ASSIGN(PepperChannel);
+};
+
+} // namespace protocol
+} // namespace remoting
+
+#endif // REMOTING_PROTOCOL_PEPPER_CHANNEL_H_

Powered by Google App Engine
This is Rietveld 408576698