Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(411)

Side by Side Diff: media/audio/scoped_loop_observer.cc

Issue 10834033: Move AudioDevice and AudioInputDevice to media. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments and fixed a few lint issues Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « media/audio/scoped_loop_observer.h ('k') | media/media.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "content/renderer/media/scoped_loop_observer.h" 5 #include "media/audio/scoped_loop_observer.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/synchronization/waitable_event.h" 8 #include "base/synchronization/waitable_event.h"
9 9
10 namespace media {
11
10 ScopedLoopObserver::ScopedLoopObserver( 12 ScopedLoopObserver::ScopedLoopObserver(
11 const scoped_refptr<base::MessageLoopProxy>& loop) 13 const scoped_refptr<base::MessageLoopProxy>& loop)
12 : loop_(loop) { 14 : loop_(loop) {
13 ObserveLoopDestruction(true, NULL); 15 ObserveLoopDestruction(true, NULL);
14 } 16 }
15 17
16 ScopedLoopObserver::~ScopedLoopObserver() { 18 ScopedLoopObserver::~ScopedLoopObserver() {
17 ObserveLoopDestruction(false, NULL); 19 ObserveLoopDestruction(false, NULL);
18 } 20 }
19 21
(...skipping 14 matching lines...) Expand all
34 base::Unretained(this), enable, &event))) { 36 base::Unretained(this), enable, &event))) {
35 event.Wait(); 37 event.Wait();
36 } else { 38 } else {
37 // The message loop's thread has already terminated, so no need to wait. 39 // The message loop's thread has already terminated, so no need to wait.
38 } 40 }
39 } 41 }
40 42
41 if (done) 43 if (done)
42 done->Signal(); 44 done->Signal();
43 } 45 }
46
47 } // namespace media.
OLDNEW
« no previous file with comments | « media/audio/scoped_loop_observer.h ('k') | media/media.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698