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

Side by Side Diff: content/renderer/media/audio_device_factory.cc

Issue 10537121: Adds AudioDevice factory for all audio clients in Chrome (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 8 years, 5 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "content/renderer/media/audio_device_factory.h"
6
7 #include "base/logging.h"
8 #include "content/renderer/media/audio_device.h"
9
10 namespace content {
11
12 // static
13 AudioDeviceFactory* AudioDeviceFactory::factory_ = NULL;
14
15 // static
16 media::AudioRendererSink* AudioDeviceFactory::Create() {
17 if (factory_) {
18 return factory_->CreateAudioDevice();
19 }
20 return new AudioDevice();
21 }
22
23 AudioDeviceFactory::AudioDeviceFactory() {
24 DCHECK(!factory_) << "Can't register two factories at once.";
25 factory_ = this;
26 }
27
28 AudioDeviceFactory::~AudioDeviceFactory() {
29 factory_ = NULL;
30 }
31
32 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/audio_device_factory.h ('k') | content/renderer/media/audio_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698