| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 ProcessTask() {} | 22 ProcessTask() {} |
| 23 virtual ~ProcessTask() {} | 23 virtual ~ProcessTask() {} |
| 24 | 24 |
| 25 virtual void Run() = 0; | 25 virtual void Run() = 0; |
| 26 }; | 26 }; |
| 27 | 27 |
| 28 class ProcessThread { | 28 class ProcessThread { |
| 29 public: | 29 public: |
| 30 virtual ~ProcessThread(); | 30 virtual ~ProcessThread(); |
| 31 | 31 |
| 32 static rtc::scoped_ptr<ProcessThread> Create(); | 32 static rtc::scoped_ptr<ProcessThread> Create(const char* thread_name); |
| 33 | 33 |
| 34 // Starts the worker thread. Must be called from the construction thread. | 34 // Starts the worker thread. Must be called from the construction thread. |
| 35 virtual void Start() = 0; | 35 virtual void Start() = 0; |
| 36 | 36 |
| 37 // Stops the worker thread. Must be called from the construction thread. | 37 // Stops the worker thread. Must be called from the construction thread. |
| 38 virtual void Stop() = 0; | 38 virtual void Stop() = 0; |
| 39 | 39 |
| 40 // Wakes the thread up to give a module a chance to do processing right | 40 // Wakes the thread up to give a module a chance to do processing right |
| 41 // away. This causes the worker thread to wake up and requery the specified | 41 // away. This causes the worker thread to wake up and requery the specified |
| 42 // module for when it should be called back. (Typically the module should | 42 // module for when it should be called back. (Typically the module should |
| (...skipping 14 matching lines...) Expand all Loading... |
| 57 virtual void RegisterModule(Module* module) = 0; | 57 virtual void RegisterModule(Module* module) = 0; |
| 58 | 58 |
| 59 // Removes a previously registered module. | 59 // Removes a previously registered module. |
| 60 // Can be called from any thread. | 60 // Can be called from any thread. |
| 61 virtual void DeRegisterModule(Module* module) = 0; | 61 virtual void DeRegisterModule(Module* module) = 0; |
| 62 }; | 62 }; |
| 63 | 63 |
| 64 } // namespace webrtc | 64 } // namespace webrtc |
| 65 | 65 |
| 66 #endif // WEBRTC_MODULES_UTILITY_INTERFACE_PROCESS_THREAD_H_ | 66 #endif // WEBRTC_MODULES_UTILITY_INTERFACE_PROCESS_THREAD_H_ |
| OLD | NEW |