| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 MEDIA_BASE_SERIAL_RUNNER_H_ | 5 #ifndef MEDIA_BASE_SERIAL_RUNNER_H_ |
| 6 #define MEDIA_BASE_SERIAL_RUNNER_H_ | 6 #define MEDIA_BASE_SERIAL_RUNNER_H_ |
| 7 | 7 |
| 8 #include <queue> | 8 #include <queue> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 const Queue& bound_fns, const PipelineStatusCB& done_cb); | 64 const Queue& bound_fns, const PipelineStatusCB& done_cb); |
| 65 | 65 |
| 66 private: | 66 private: |
| 67 friend struct base::DefaultDeleter<SerialRunner>; | 67 friend struct base::DefaultDeleter<SerialRunner>; |
| 68 | 68 |
| 69 SerialRunner(const Queue& bound_fns, const PipelineStatusCB& done_cb); | 69 SerialRunner(const Queue& bound_fns, const PipelineStatusCB& done_cb); |
| 70 ~SerialRunner(); | 70 ~SerialRunner(); |
| 71 | 71 |
| 72 void RunNextInSeries(PipelineStatus last_status); | 72 void RunNextInSeries(PipelineStatus last_status); |
| 73 | 73 |
| 74 base::WeakPtrFactory<SerialRunner> weak_this_; | |
| 75 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; | 74 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
| 76 Queue bound_fns_; | 75 Queue bound_fns_; |
| 77 PipelineStatusCB done_cb_; | 76 PipelineStatusCB done_cb_; |
| 78 | 77 |
| 78 // NOTE: Weak pointers must be invalidated before all other member variables. |
| 79 base::WeakPtrFactory<SerialRunner> weak_factory_; |
| 80 |
| 79 DISALLOW_COPY_AND_ASSIGN(SerialRunner); | 81 DISALLOW_COPY_AND_ASSIGN(SerialRunner); |
| 80 }; | 82 }; |
| 81 | 83 |
| 82 } // namespace media | 84 } // namespace media |
| 83 | 85 |
| 84 #endif // MEDIA_BASE_SERIAL_RUNNER_H_ | 86 #endif // MEDIA_BASE_SERIAL_RUNNER_H_ |
| OLD | NEW |