| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 BASE_TASK_H_ | 5 #ifndef BASE_TASK_H_ |
| 6 #define BASE_TASK_H_ | 6 #define BASE_TASK_H_ |
| 7 | 7 |
| 8 #include "base/logging.h" | |
| 9 #include "base/non_thread_safe.h" | 8 #include "base/non_thread_safe.h" |
| 10 #include "base/revocable_store.h" | 9 #include "base/revocable_store.h" |
| 11 #include "base/tracked.h" | 10 #include "base/tracked.h" |
| 12 #include "base/tuple.h" | 11 #include "base/tuple.h" |
| 13 | 12 |
| 14 // Task ------------------------------------------------------------------------ | 13 // Task ------------------------------------------------------------------------ |
| 15 // | 14 // |
| 16 // A task is a generic runnable thingy, usually used for running code on a | 15 // A task is a generic runnable thingy, usually used for running code on a |
| 17 // different thread or for scheduling future tasks off of the message loop. | 16 // different thread or for scheduling future tasks off of the message loop. |
| 18 | 17 |
| (...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 661 UnboundMethod(Method m, Params p) : m_(m), p_(p) {} | 660 UnboundMethod(Method m, Params p) : m_(m), p_(p) {} |
| 662 void Run(T* obj) const { | 661 void Run(T* obj) const { |
| 663 DispatchToMethod(obj, m_, p_); | 662 DispatchToMethod(obj, m_, p_); |
| 664 } | 663 } |
| 665 private: | 664 private: |
| 666 Method m_; | 665 Method m_; |
| 667 Params p_; | 666 Params p_; |
| 668 }; | 667 }; |
| 669 | 668 |
| 670 #endif // BASE_TASK_H_ | 669 #endif // BASE_TASK_H_ |
| OLD | NEW |