Add a new Task Queue for WinUWP.

WinUWP cannot use the win task queue as post/peek message event loop
is not available. A replacement version written using stdlib compatible
with WinUWP is added as an alternative.

Change-Id: Ie9d6e6f11f395d1815d8f04633772a0c597ed30a
Bug: webrtc:10046
Reviewed-on: https://webrtc-review.googlesource.com/c/108520
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25781}
diff --git a/rtc_base/BUILD.gn b/rtc_base/BUILD.gn
index f188d47..27bf5df 100644
--- a/rtc_base/BUILD.gn
+++ b/rtc_base/BUILD.gn
@@ -243,6 +243,7 @@
     ":rtc_base_approved",
     ":rtc_task_queue_libevent",
     ":rtc_task_queue_win",
+    ":rtc_task_queue_stdlib",
     ":sequenced_task_checker",
   ]
   sources = [
@@ -604,6 +605,26 @@
   }
 }
 
+rtc_source_set("rtc_task_queue_stdlib") {
+  visibility = [ ":rtc_task_queue_impl" ]
+  sources = [
+    "task_queue_stdlib.cc",
+  ]
+  deps = [
+    ":checks",
+    ":criticalsection",
+    ":logging",
+    ":macromagic",
+    ":platform_thread",
+    ":ptr_util",
+    ":refcount",
+    ":rtc_event",
+    ":rtc_task_queue_api",
+    ":safe_conversions",
+    ":timeutils",
+  ]
+}
+
 rtc_source_set("rtc_task_queue_impl") {
   visibility = [ "*" ]
   if (rtc_enable_libevent) {
@@ -617,9 +638,15 @@
       ]
     }
     if (is_win) {
-      deps = [
-        ":rtc_task_queue_win",
-      ]
+      if (current_os == "winuwp") {
+        deps = [
+          ":rtc_task_queue_stdlib",
+        ]
+      } else {
+        deps = [
+          ":rtc_task_queue_win",
+        ]
+      }
     }
   }
 }