| 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_AUDIO_SCOPED_LOOP_OBSERVER_H_ | 5 #ifndef MEDIA_AUDIO_SCOPED_LOOP_OBSERVER_H_ |
| 6 #define MEDIA_AUDIO_SCOPED_LOOP_OBSERVER_H_ | 6 #define MEDIA_AUDIO_SCOPED_LOOP_OBSERVER_H_ |
| 7 | 7 |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "base/message_loop_proxy.h" | 10 #include "base/message_loop/message_loop_proxy.h" |
| 11 | 11 |
| 12 namespace base { | 12 namespace base { |
| 13 class WaitableEvent; | 13 class WaitableEvent; |
| 14 } | 14 } |
| 15 | 15 |
| 16 namespace media { | 16 namespace media { |
| 17 | 17 |
| 18 // A common base class for AudioOutputDevice and AudioInputDevice that manages | 18 // A common base class for AudioOutputDevice and AudioInputDevice that manages |
| 19 // a message loop pointer and monitors it for destruction. If the object goes | 19 // a message loop pointer and monitors it for destruction. If the object goes |
| 20 // out of scope before the message loop, the object will automatically remove | 20 // out of scope before the message loop, the object will automatically remove |
| (...skipping 20 matching lines...) Expand all Loading... |
| 41 // A pointer to the message loop's proxy. In case the loop gets destroyed | 41 // A pointer to the message loop's proxy. In case the loop gets destroyed |
| 42 // before this object goes out of scope, PostTask etc will fail but not crash. | 42 // before this object goes out of scope, PostTask etc will fail but not crash. |
| 43 scoped_refptr<base::MessageLoopProxy> loop_; | 43 scoped_refptr<base::MessageLoopProxy> loop_; |
| 44 | 44 |
| 45 DISALLOW_COPY_AND_ASSIGN(ScopedLoopObserver); | 45 DISALLOW_COPY_AND_ASSIGN(ScopedLoopObserver); |
| 46 }; | 46 }; |
| 47 | 47 |
| 48 } // namespace media. | 48 } // namespace media. |
| 49 | 49 |
| 50 #endif // MEDIA_AUDIO_SCOPED_LOOP_OBSERVER_H_ | 50 #endif // MEDIA_AUDIO_SCOPED_LOOP_OBSERVER_H_ |
| OLD | NEW |