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

Unified Diff: components/devtools_bridge/abstract_peer_connection.h

Issue 716433003: Continue impementation SessionDependencyFactoryNative. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@native-factory
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
Index: components/devtools_bridge/abstract_peer_connection.h
diff --git a/components/devtools_bridge/abstract_peer_connection.h b/components/devtools_bridge/abstract_peer_connection.h
new file mode 100644
index 0000000000000000000000000000000000000000..9fd04a8774e9e00b0127eda60fd816e890b956bc
--- /dev/null
+++ b/components/devtools_bridge/abstract_peer_connection.h
@@ -0,0 +1,65 @@
+// Copyright 2014 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 COMPONENTS_DEVTOOLS_BRIDGE_ABSTRACT_PEER_CONNECTION_H_
+#define COMPONENTS_DEVTOOLS_BRIDGE_ABSTRACT_PEER_CONNECTION_H_
+
+#include <string>
+
+#include "base/memory/scoped_ptr.h"
+
+namespace devtools_bridge {
+
+class AbstractDataChannel;
+
+/**
+ * WebRTC PeerConnection adapter for DevTools bridge.
+ */
+class AbstractPeerConnection {
+ public:
+ /**
+ * Delegate is called on signaling thread.
+ */
+ class Delegate {
+ public:
+ Delegate() {}
+ virtual ~Delegate() {}
+
+ virtual void OnIceConnectionChange(bool connected) = 0;
+ virtual void OnIceCandidate(
+ const std::string& sdp_mid,
+ int sdp_mline_index,
+ const std::string& sdp) = 0;
+ virtual void OnLocalOfferCreatedAndSetSet(
+ const std::string& description) = 0;
+ virtual void OnLocalAnswerCreatedAndSetSet(
+ const std::string& description) = 0;
+ virtual void OnRemoteDescriptionSet() = 0;
+ virtual void OnFailure(const std::string& description) = 0;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(Delegate);
+ };
+
+ AbstractPeerConnection() {}
+ virtual ~AbstractPeerConnection() {}
+
+ virtual void CreateAndSetLocalOffer() = 0;
+ virtual void CreateAndSetLocalAnswer() = 0;
+ virtual void SetRemoteOffer(const std::string& description) = 0;
+ virtual void SetRemoteAnswer(const std::string& description) = 0;
+ virtual void AddIceCandidate(
+ const std::string& sdp_mid,
+ int sdp_mline_index,
+ const std::string& sdp) = 0;
+
+ virtual scoped_ptr<AbstractDataChannel> CreateDataChannel(int channelId) = 0;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(AbstractPeerConnection);
+};
+
+} // namespace devtools_bridge
+
+#endif // COMPONENTS_DEVTOOLS_BRIDGE_ABSTRACT_PEER_CONNECTION_H_

Powered by Google App Engine
This is Rietveld 408576698