Deprecate PeerConnectionFactory::CreatePeerConnection

Applications should use CreatePeerConnectionOrError instead.

Moved fallback implementations of CreatePeerConnection into the
api/peer_connection_interface.h file, so that we do not have to
declare these methods in the proxy.

Bug: webrtc:12238
Change-Id: I70c56336641c2a108b68446ae41f43409277a584
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/217762
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33964}
diff --git a/examples/unityplugin/simple_peer_connection.cc b/examples/unityplugin/simple_peer_connection.cc
index 23e4d7b..128ca76 100644
--- a/examples/unityplugin/simple_peer_connection.cc
+++ b/examples/unityplugin/simple_peer_connection.cc
@@ -192,10 +192,14 @@
   config_.servers.push_back(stun_server);
   config_.enable_dtls_srtp = false;
 
-  peer_connection_ = g_peer_connection_factory->CreatePeerConnection(
-      config_, nullptr, nullptr, this);
-
-  return peer_connection_.get() != nullptr;
+  auto result = g_peer_connection_factory->CreatePeerConnectionOrError(
+      config_, webrtc::PeerConnectionDependencies(this));
+  if (!result.ok()) {
+    peer_connection_ = nullptr;
+    return false;
+  }
+  peer_connection_ = result.MoveValue();
+  return true;
 }
 
 void SimplePeerConnection::DeletePeerConnection() {