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

Unified Diff: webrtc/modules/utility/include/process_thread.h

Issue 2020783003: Revert of Change ProcessThread's task type to be the one from TaskQueue. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 7 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/modules/utility/include/process_thread.h
diff --git a/webrtc/modules/utility/include/process_thread.h b/webrtc/modules/utility/include/process_thread.h
index 8524a5188eb2d9446d5b1c40a08549ef488061b1..f6913ea3167481eef084579aaf38be0c54088aeb 100644
--- a/webrtc/modules/utility/include/process_thread.h
+++ b/webrtc/modules/utility/include/process_thread.h
@@ -15,23 +15,17 @@
#include "webrtc/typedefs.h"
-#if defined(WEBRTC_WIN)
-// Due to a bug in the std::unique_ptr implementation that ships with MSVS,
-// we need the full definition of QueuedTask, on Windows.
-#include "webrtc/base/task_queue.h"
-#else
-namespace rtc {
-class QueuedTask;
-}
-#endif
-
namespace webrtc {
class Module;
-// TODO(tommi): ProcessThread probably doesn't need to be a virtual
-// interface. There exists one override besides ProcessThreadImpl,
-// MockProcessThread, but when looking at how it is used, it seems
-// a nullptr might suffice (or simply an actual ProcessThread instance).
+class ProcessTask {
+ public:
+ ProcessTask() {}
+ virtual ~ProcessTask() {}
+
+ virtual void Run() = 0;
+};
+
class ProcessThread {
public:
virtual ~ProcessThread();
@@ -57,7 +51,7 @@
// construction thread of the ProcessThread instance, if the task did not
// get a chance to run (e.g. posting the task while shutting down or when
// the thread never runs).
- virtual void PostTask(std::unique_ptr<rtc::QueuedTask> task) = 0;
+ virtual void PostTask(std::unique_ptr<ProcessTask> task) = 0;
// Adds a module that will start to receive callbacks on the worker thread.
// Can be called from any thread.
« no previous file with comments | « webrtc/modules/utility/include/mock/mock_process_thread.h ('k') | webrtc/modules/utility/source/process_thread_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698