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

Side by Side Diff: base/task_scheduler/task_tracker_posix.h

Issue 2427963002: Support FileDescriptorWatcher in TaskScheduler. (Closed)
Patch Set: fix build error (add BASE_EXPORT) Created 4 years, 1 month 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
« no previous file with comments | « base/task_scheduler/task_tracker.cc ('k') | base/task_scheduler/task_tracker_posix.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 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 BASE_TASK_SCHEDULER_TASK_TRACKER_POSIX_H_
6 #define BASE_TASK_SCHEDULER_TASK_TRACKER_POSIX_H_
7
8 #include <memory>
9
10 #include "base/base_export.h"
11 #include "base/macros.h"
12 #include "base/task_scheduler/task_tracker.h"
13
14 namespace base {
15
16 class MessageLoopForIO;
17
18 namespace internal {
19
20 struct Task;
21
22 // A TaskTracker that instantiates a FileDescriptorWatcher in the scope in which
23 // a task runs. Used on all POSIX platforms except NaCl SFI.
24 class BASE_EXPORT TaskTrackerPosix : public TaskTracker {
25 public:
26 // |watch_file_descriptor_message_loop| is used to setup FileDescriptorWatcher
27 // in the scope in which a Task runs.
28 TaskTrackerPosix(MessageLoopForIO* watch_file_descriptor_message_loop);
29 ~TaskTrackerPosix();
30
31 private:
32 // TaskTracker:
33 void PerformRunTask(std::unique_ptr<Task> task) override;
34
35 MessageLoopForIO* const watch_file_descriptor_message_loop_;
36
37 DISALLOW_COPY_AND_ASSIGN(TaskTrackerPosix);
38 };
39
40 } // namespace internal
41 } // namespace base
42
43 #endif // BASE_TASK_SCHEDULER_TASK_TRACKER_POSIX_H_
OLDNEW
« no previous file with comments | « base/task_scheduler/task_tracker.cc ('k') | base/task_scheduler/task_tracker_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698