Remove dependency from blink/public to webrtc/p2p

As part of making blink/public's dependencies automatically
checked by gn, this is one dependency that was unintended and
unnecessary. Moving the dependency into platform/export makes
for a cleaner API.

Bug: 800764

Change-Id: I4e5f2095bddc4e51de08ed16db51c248884dfd5f
Reviewed-on: https://chromium-review.googlesource.com/c/1301468
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#603370}
diff --git a/third_party/blink/public/platform/platform.h b/third_party/blink/public/platform/platform.h
index 2906462..6225f1f 100644
--- a/third_party/blink/public/platform/platform.h
+++ b/third_party/blink/public/platform/platform.h
@@ -64,12 +64,15 @@
 #include "third_party/blink/public/platform/web_url_error.h"
 #include "third_party/blink/public/platform/web_url_loader.h"
 #include "third_party/blink/public/platform/web_url_loader_factory.h"
-#include "third_party/webrtc/p2p/base/portallocator.h"
 
 namespace base {
 class SingleThreadTaskRunner;
 }
 
+namespace cricket {
+class PortAllocator;
+}
+
 namespace gpu {
 class GpuMemoryBufferManager;
 }
@@ -651,9 +654,7 @@
 
   // May return null if WebRTC functionality is not implemented.
   virtual std::unique_ptr<cricket::PortAllocator> CreateWebRtcPortAllocator(
-      WebLocalFrame* frame) {
-    return nullptr;
-  }
+      WebLocalFrame* frame);
 
   // Creates a WebCanvasCaptureHandler to capture Canvas output.
   virtual std::unique_ptr<WebCanvasCaptureHandler>
diff --git a/third_party/blink/renderer/platform/exported/platform.cc b/third_party/blink/renderer/platform/exported/platform.cc
index a8f07f7..f4415a71 100644
--- a/third_party/blink/renderer/platform/exported/platform.cc
+++ b/third_party/blink/renderer/platform/exported/platform.cc
@@ -68,6 +68,7 @@
 #include "third_party/blink/renderer/platform/web_task_runner.h"
 #include "third_party/blink/renderer/platform/wtf/hash_map.h"
 #include "third_party/webrtc/api/rtpparameters.h"
+#include "third_party/webrtc/p2p/base/portallocator.h"
 
 namespace blink {
 
@@ -327,6 +328,11 @@
   return nullptr;
 }
 
+std::unique_ptr<cricket::PortAllocator> Platform::CreateWebRtcPortAllocator(
+    WebLocalFrame* frame) {
+  return nullptr;
+}
+
 std::unique_ptr<WebMediaRecorderHandler> Platform::CreateMediaRecorderHandler(
     scoped_refptr<base::SingleThreadTaskRunner>) {
   return nullptr;