Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * libjingle | 2 * libjingle |
| 3 * Copyright 2004--2006, Google Inc. | 3 * Copyright 2004--2006, Google Inc. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
| 9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 54 | 54 |
| 55 void StartTask(Task *task); | 55 void StartTask(Task *task); |
| 56 void RunTasks(); | 56 void RunTasks(); |
| 57 void PollTasks(); | 57 void PollTasks(); |
| 58 | 58 |
| 59 void UpdateTaskTimeout(Task *task); | 59 void UpdateTaskTimeout(Task *task); |
| 60 | 60 |
| 61 // dummy state machine - never run. | 61 // dummy state machine - never run. |
| 62 virtual int ProcessStart() { return STATE_DONE; } | 62 virtual int ProcessStart() { return STATE_DONE; } |
| 63 | 63 |
| 64 bool HasPendingTimeoutTask() { | |
| 65 return next_timeout_task_ != NULL && | |
| 66 next_timeout_task_->TimedOut(); | |
|
tim (not reviewing)
2009/11/12 19:42:53
nit - indent 2 more.
| |
| 67 } | |
| 68 | |
| 64 private: | 69 private: |
| 65 std::vector<Task *> tasks_; | 70 std::vector<Task *> tasks_; |
| 66 Task *next_timeout_task_; | 71 Task *next_timeout_task_; |
| 67 bool tasks_running_; | 72 bool tasks_running_; |
| 68 | 73 |
| 69 void RecalcNextTimeout(Task *exclude_task); | 74 void RecalcNextTimeout(Task *exclude_task); |
| 70 }; | 75 }; |
| 71 | 76 |
| 72 } // namespace talk_base | 77 } // namespace talk_base |
| 73 | 78 |
| 74 #endif // TASK_BASE_TASKRUNNER_H__ | 79 #endif // TASK_BASE_TASKRUNNER_H__ |
| OLD | NEW |