| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_TEST_ORDERED_SIMPLE_TASK_RUNNER_H_ | 5 #ifndef CC_TEST_ORDERED_SIMPLE_TASK_RUNNER_H_ |
| 6 #define CC_TEST_ORDERED_SIMPLE_TASK_RUNNER_H_ | 6 #define CC_TEST_ORDERED_SIMPLE_TASK_RUNNER_H_ |
| 7 | 7 |
| 8 #include <stddef.h> |
| 9 |
| 8 #include <limits> | 10 #include <limits> |
| 9 #include <set> | 11 #include <set> |
| 10 #include <vector> | 12 #include <vector> |
| 11 | 13 |
| 12 #include "base/basictypes.h" | |
| 13 #include "base/compiler_specific.h" | 14 #include "base/compiler_specific.h" |
| 14 #include "base/logging.h" | 15 #include "base/logging.h" |
| 16 #include "base/macros.h" |
| 15 #include "base/test/simple_test_tick_clock.h" | 17 #include "base/test/simple_test_tick_clock.h" |
| 16 #include "base/test/test_simple_task_runner.h" | 18 #include "base/test/test_simple_task_runner.h" |
| 17 #include "base/trace_event/trace_event.h" | 19 #include "base/trace_event/trace_event.h" |
| 18 | 20 |
| 19 namespace cc { | 21 namespace cc { |
| 20 | 22 |
| 21 // Subclass of TestPendingTask which has a unique ID for every task, supports | 23 // Subclass of TestPendingTask which has a unique ID for every task, supports |
| 22 // being used inside a std::set and has debug tracing support. | 24 // being used inside a std::set and has debug tracing support. |
| 23 class TestOrderablePendingTask : public base::TestPendingTask { | 25 class TestOrderablePendingTask : public base::TestPendingTask { |
| 24 public: | 26 public: |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 bool inside_run_tasks_until_; | 148 bool inside_run_tasks_until_; |
| 147 std::set<TestOrderablePendingTask> pending_tasks_; | 149 std::set<TestOrderablePendingTask> pending_tasks_; |
| 148 | 150 |
| 149 private: | 151 private: |
| 150 DISALLOW_COPY_AND_ASSIGN(OrderedSimpleTaskRunner); | 152 DISALLOW_COPY_AND_ASSIGN(OrderedSimpleTaskRunner); |
| 151 }; | 153 }; |
| 152 | 154 |
| 153 } // namespace cc | 155 } // namespace cc |
| 154 | 156 |
| 155 #endif // CC_TEST_ORDERED_SIMPLE_TASK_RUNNER_H_ | 157 #endif // CC_TEST_ORDERED_SIMPLE_TASK_RUNNER_H_ |
| OLD | NEW |