OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CC_TREES_BLOCKING_TASK_RUNNER_H_ | 5 #ifndef CC_TREES_BLOCKING_TASK_RUNNER_H_ |
6 #define CC_TREES_BLOCKING_TASK_RUNNER_H_ | 6 #define CC_TREES_BLOCKING_TASK_RUNNER_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/location.h" | 10 #include "base/location.h" |
| 11 #include "base/macros.h" |
11 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
12 #include "base/single_thread_task_runner.h" | 13 #include "base/single_thread_task_runner.h" |
13 #include "base/synchronization/lock.h" | 14 #include "base/synchronization/lock.h" |
14 #include "base/threading/platform_thread.h" | 15 #include "base/threading/platform_thread.h" |
15 #include "cc/base/cc_export.h" | 16 #include "cc/base/cc_export.h" |
16 | 17 |
17 namespace cc { | 18 namespace cc { |
18 | 19 |
19 // This class wraps a SingleThreadTaskRunner but allows posted tasks to be | 20 // This class wraps a SingleThreadTaskRunner but allows posted tasks to be |
20 // run without a round trip through the message loop. This shortcutting | 21 // run without a round trip through the message loop. This shortcutting |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 base::Lock lock_; | 90 base::Lock lock_; |
90 int capture_; | 91 int capture_; |
91 std::vector<base::Closure> captured_tasks_; | 92 std::vector<base::Closure> captured_tasks_; |
92 | 93 |
93 DISALLOW_COPY_AND_ASSIGN(BlockingTaskRunner); | 94 DISALLOW_COPY_AND_ASSIGN(BlockingTaskRunner); |
94 }; | 95 }; |
95 | 96 |
96 } // namespace cc | 97 } // namespace cc |
97 | 98 |
98 #endif // CC_TREES_BLOCKING_TASK_RUNNER_H_ | 99 #endif // CC_TREES_BLOCKING_TASK_RUNNER_H_ |
OLD | NEW |