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

Unified Diff: webrtc/rtc_base/task_queue_impl.h

Issue 2936213003: Test using a global, replacable TaskQueueImpl factory.
Patch Set: Added global factory. Created 3 years, 4 months 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: webrtc/rtc_base/task_queue_impl.h
diff --git a/webrtc/rtc_base/task_queue_impl.h b/webrtc/rtc_base/task_queue_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..3924b4c077f74b7951eb277c249374d3e78997e5
--- /dev/null
+++ b/webrtc/rtc_base/task_queue_impl.h
@@ -0,0 +1,34 @@
+/*
+ * Copyright 2017 The WebRTC Project Authors. All rights reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#ifndef WEBRTC_RTC_BASE_TASK_QUEUE_IMPL_H_
+#define WEBRTC_RTC_BASE_TASK_QUEUE_IMPL_H_
+
+#include <memory>
+
+#include "webrtc/rtc_base/refcount.h"
+#include "webrtc/rtc_base/scoped_ref_ptr.h"
+#include "webrtc/rtc_base/task_queue.h"
+
+namespace rtc {
+
+class TaskQueueImpl : public RefCountInterface {
+ public:
+ virtual bool IsCurrent() const = 0;
+ virtual void PostTask(std::unique_ptr<QueuedTask> task) = 0;
+ virtual void PostTaskAndReply(std::unique_ptr<QueuedTask> task,
+ std::unique_ptr<QueuedTask> reply,
+ TaskQueueImpl* reply_queue) = 0;
+ virtual void PostDelayedTask(std::unique_ptr<QueuedTask> task,
+ uint32_t milliseconds) = 0;
+};
+
+} // namespace rtc
+#endif // WEBRTC_RTC_BASE_TASK_QUEUE_IMPL_H_

Powered by Google App Engine
This is Rietveld 408576698