Adds CreateTaskQueueFactory to TimeController

Bug: webrtc:11255
Change-Id: I02bdc944c7081590f40a77b315f64c63adbc6ff8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/166921
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30349}
diff --git a/api/test/time_controller.h b/api/test/time_controller.h
index 6d09481..aa69c52 100644
--- a/api/test/time_controller.h
+++ b/api/test/time_controller.h
@@ -35,6 +35,12 @@
   // The returned factory will created task queues that runs in implementation
   // defined time domain.
   virtual TaskQueueFactory* GetTaskQueueFactory() = 0;
+  // Simple helper to create an owned factory that can be used as a parameter
+  // for PeerConnectionFactory. Note that this might depend on the underlying
+  // time controller and therfore must be destroyed before the time controller
+  // is destroyed.
+  std::unique_ptr<TaskQueueFactory> CreateTaskQueueFactory();
+
   // Creates a process thread.
   virtual std::unique_ptr<ProcessThread> CreateProcessThread(
       const char* thread_name) = 0;