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

Side by Side Diff: mojo/public/cpp/bindings/tests/thread_per_task_sequenced_task_runner.h

Issue 2608163003: Change single-interface mojo bindings to use SequencedTaskRunner. (Closed)
Patch Set: Created 3 years, 10 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_TESTS_THREAD_PER_TASK_SEQUENCED_TASK_RUNNER_H_
6 #define MOJO_PUBLIC_CPP_BINDINGS_TESTS_THREAD_PER_TASK_SEQUENCED_TASK_RUNNER_H_
7
8 #include "base/macros.h"
9 #include "base/sequenced_task_runner.h"
10
11 namespace mojo {
12 namespace test {
13
14 // Holds a base::SequencedTaskRunner implementation that runs each task on a
15 // separate thread. Note that task delays are ignored and non-nestable tasks are
16 // treated as nestable.
17 class ThreadPerTaskSequencedTaskRunnerOwner {
18 public:
19 ThreadPerTaskSequencedTaskRunnerOwner();
20 ~ThreadPerTaskSequencedTaskRunnerOwner();
21
22 scoped_refptr<base::SequencedTaskRunner> GetSequencedTaskRunner();
23
24 private:
25 class TaskRunnerImpl;
26
27 scoped_refptr<TaskRunnerImpl> task_runner_;
28
29 DISALLOW_COPY_AND_ASSIGN(ThreadPerTaskSequencedTaskRunnerOwner);
30 };
31
32 } // namespace test
33 } // namespace mojo
34
35 #endif // MOJO_PUBLIC_CPP_BINDINGS_TESTS_THREAD_PER_TASK_SEQUENCED_TASK_RUNNER_ H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698