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

Side by Side Diff: cc/test/ordered_simple_task_runner.h

Issue 662473003: cc: Replace > > with >> (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: angles: . Created 6 years, 2 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
« no previous file with comments | « cc/test/layer_tree_pixel_test.h ('k') | cc/test/ordered_simple_task_runner.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <limits> 8 #include <limits>
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 80
81 // Run tasks while the callback returns true or too many tasks have been run. 81 // Run tasks while the callback returns true or too many tasks have been run.
82 // Returns true if there are still pending tasks left. 82 // Returns true if there are still pending tasks left.
83 bool RunTasksWhile(base::Callback<bool(void)> condition); 83 bool RunTasksWhile(base::Callback<bool(void)> condition);
84 84
85 // Run tasks while *all* of the callbacks return true or too many tasks have 85 // Run tasks while *all* of the callbacks return true or too many tasks have
86 // been run. Exits on the *first* condition which returns false, skipping 86 // been run. Exits on the *first* condition which returns false, skipping
87 // calling all remaining conditions. Conditions can have side effects, 87 // calling all remaining conditions. Conditions can have side effects,
88 // including modifying the task queue. 88 // including modifying the task queue.
89 // Returns true if there are still pending tasks left. 89 // Returns true if there are still pending tasks left.
90 bool RunTasksWhile( 90 bool RunTasksWhile(const std::vector<base::Callback<bool(void)>>& conditions);
91 const std::vector<base::Callback<bool(void)> >& conditions);
92 91
93 // Convenience functions to run tasks with common conditions. 92 // Convenience functions to run tasks with common conditions.
94 93
95 // Run tasks which existed at the start of this call. 94 // Run tasks which existed at the start of this call.
96 // Return code indicates tasks still exist to run. 95 // Return code indicates tasks still exist to run.
97 bool RunPendingTasks(); 96 bool RunPendingTasks();
98 // Keep running tasks until no tasks are left. 97 // Keep running tasks until no tasks are left.
99 // Return code indicates tasks still exist to run which also indicates if 98 // Return code indicates tasks still exist to run which also indicates if
100 // runner reached idle. 99 // runner reached idle.
101 bool RunUntilIdle(); 100 bool RunUntilIdle();
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 bool inside_run_tasks_until_; 145 bool inside_run_tasks_until_;
147 std::set<TestOrderablePendingTask> pending_tasks_; 146 std::set<TestOrderablePendingTask> pending_tasks_;
148 147
149 private: 148 private:
150 DISALLOW_COPY_AND_ASSIGN(OrderedSimpleTaskRunner); 149 DISALLOW_COPY_AND_ASSIGN(OrderedSimpleTaskRunner);
151 }; 150 };
152 151
153 } // namespace cc 152 } // namespace cc
154 153
155 #endif // CC_TEST_ORDERED_SIMPLE_TASK_RUNNER_H_ 154 #endif // CC_TEST_ORDERED_SIMPLE_TASK_RUNNER_H_
OLDNEW
« no previous file with comments | « cc/test/layer_tree_pixel_test.h ('k') | cc/test/ordered_simple_task_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698