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

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

Issue 69953026: Log actual streams, not output controllers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Mac. Created 7 years, 1 month 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/audio_manager.h ('k') | media/audio/audio_output_dispatcher_impl.h » ('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 "media/audio/audio_manager.h" 5 #include "media/audio/audio_manager.h"
6 6
7 #include "base/at_exit.h" 7 #include "base/at_exit.h"
8 #include "base/atomicops.h" 8 #include "base/atomicops.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/message_loop/message_loop.h" 12 #include "base/message_loop/message_loop.h"
13 #include "content/browser/media/media_internals.h"
13 14
14 namespace media { 15 namespace media {
15 namespace { 16 namespace {
16 AudioManager* g_last_created = NULL; 17 AudioManager* g_last_created = NULL;
17 } 18 }
18 19
19 // Forward declaration of the platform specific AudioManager factory function. 20 // Forward declaration of the platform specific AudioManager factory function.
20 AudioManager* CreateAudioManager(); 21 AudioManager* CreateAudioManager();
21 22
22 AudioManager::AudioManager() { 23 AudioManager::AudioManager() {
23 } 24 }
24 25
25 AudioManager::~AudioManager() { 26 AudioManager::~AudioManager() {
26 CHECK(g_last_created == NULL || g_last_created == this); 27 CHECK(g_last_created == NULL || g_last_created == this);
27 g_last_created = NULL; 28 g_last_created = NULL;
28 } 29 }
29 30
30 // static 31 // static
31 AudioManager* AudioManager::Create() { 32 AudioManager* AudioManager::Create() {
32 CHECK(g_last_created == NULL); 33 CHECK(g_last_created == NULL);
33 g_last_created = CreateAudioManager(); 34 g_last_created = CreateAudioManager();
34 return g_last_created; 35 return g_last_created;
35 } 36 }
36 37
37 // static 38 // static
38 AudioManager* AudioManager::Get() { 39 AudioManager* AudioManager::Get() {
39 return g_last_created; 40 return g_last_created;
40 } 41 }
41 42
43 void AudioManager::SetMediaInternals(content::MediaInternals* media_internals) {
44 media_internals_ = media_internals;
45 }
46
47 content::MediaInternals* AudioManager::GetMediaInternals() {
48 return media_internals_;
49 }
50
42 } // namespace media 51 } // namespace media
OLDNEW
« no previous file with comments | « media/audio/audio_manager.h ('k') | media/audio/audio_output_dispatcher_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698