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

Unified Diff: mojo/edk/platform/task_runner.h

Issue 1496663002: EDK: Make mojo::platform::TaskRunner's PostTask() take an std::function<void()>. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years 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
« no previous file with comments | « mojo/edk/embedder/embedder_unittest.cc ('k') | mojo/edk/system/channel.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/platform/task_runner.h
diff --git a/mojo/edk/platform/task_runner.h b/mojo/edk/platform/task_runner.h
index e54213f34bd5da7178cbae6b881771d3b09b6348..c9af1ca98f2d4aa118049af9fe50d4bf27ed816d 100644
--- a/mojo/edk/platform/task_runner.h
+++ b/mojo/edk/platform/task_runner.h
@@ -8,6 +8,8 @@
#ifndef MOJO_EDK_PLATFORM_TASK_RUNNER_H_
#define MOJO_EDK_PLATFORM_TASK_RUNNER_H_
+#include <functional>
+
#include "base/callback_forward.h"
#include "mojo/edk/util/ref_counted.h"
#include "mojo/public/cpp/system/macros.h"
@@ -25,7 +27,8 @@ class TaskRunner : public util::RefCountedThreadSafe<TaskRunner> {
// Posts a task to this task runner (i.e., schedule the task). The task must
// be run (insofar as this can be guaranteed). (This must not run the task
// synchronously.)
- // TODO(vtl): Replace the |base::Closure| with |std::function<void()>|.
+ // TODO(vtl): Remove the |base::Closure| version.
+ virtual void PostTask(std::function<void()>&& task) = 0;
virtual void PostTask(const base::Closure& task) = 0;
// Returns true if this task runner may run tasks on the current thread, false
« no previous file with comments | « mojo/edk/embedder/embedder_unittest.cc ('k') | mojo/edk/system/channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698