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

Side by Side Diff: content/browser/renderer_host/media/audio_renderer_host.h

Issue 9015021: Remove DeleteTask and convert remaining users. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix last Linux gotchas (upload attempt #2) Created 8 years, 11 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
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // AudioRendererHost serves audio related requests from AudioRenderer which 5 // AudioRendererHost serves audio related requests from AudioRenderer which
6 // lives inside the render process and provide access to audio hardware. 6 // lives inside the render process and provide access to audio hardware.
7 // 7 //
8 // This class is owned by BrowserRenderProcessHost, and instantiated on UI 8 // This class is owned by BrowserRenderProcessHost, and instantiated on UI
9 // thread, but all other operations and method calls happen on IO thread, so we 9 // thread, but all other operations and method calls happen on IO thread, so we
10 // need to be extra careful about the lifetime of this object. AudioManager is a 10 // need to be extra careful about the lifetime of this object. AudioManager is a
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 51
52 #ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_RENDERER_HOST_H_ 52 #ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_RENDERER_HOST_H_
53 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_RENDERER_HOST_H_ 53 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_RENDERER_HOST_H_
54 #pragma once 54 #pragma once
55 55
56 #include <map> 56 #include <map>
57 57
58 #include "base/gtest_prod_util.h" 58 #include "base/gtest_prod_util.h"
59 #include "base/memory/ref_counted.h" 59 #include "base/memory/ref_counted.h"
60 #include "base/memory/scoped_ptr.h" 60 #include "base/memory/scoped_ptr.h"
61 #include "base/message_loop_helpers.h"
61 #include "base/process.h" 62 #include "base/process.h"
62 #include "base/shared_memory.h" 63 #include "base/shared_memory.h"
63 #include "content/common/content_export.h" 64 #include "content/common/content_export.h"
64 #include "content/public/browser/browser_message_filter.h" 65 #include "content/public/browser/browser_message_filter.h"
65 #include "content/public/browser/browser_thread.h" 66 #include "content/public/browser/browser_thread.h"
66 #include "media/audio/audio_io.h" 67 #include "media/audio/audio_io.h"
67 #include "media/audio/audio_output_controller.h" 68 #include "media/audio/audio_output_controller.h"
68 #include "media/audio/simple_sources.h" 69 #include "media/audio/simple_sources.h"
69 70
70 class AudioManager; 71 class AudioManager;
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 virtual void OnPlaying(media::AudioOutputController* controller) OVERRIDE; 119 virtual void OnPlaying(media::AudioOutputController* controller) OVERRIDE;
119 virtual void OnPaused(media::AudioOutputController* controller) OVERRIDE; 120 virtual void OnPaused(media::AudioOutputController* controller) OVERRIDE;
120 virtual void OnError(media::AudioOutputController* controller, 121 virtual void OnError(media::AudioOutputController* controller,
121 int error_code) OVERRIDE; 122 int error_code) OVERRIDE;
122 virtual void OnMoreData(media::AudioOutputController* controller, 123 virtual void OnMoreData(media::AudioOutputController* controller,
123 AudioBuffersState buffers_state) OVERRIDE; 124 AudioBuffersState buffers_state) OVERRIDE;
124 125
125 private: 126 private:
126 friend class AudioRendererHostTest; 127 friend class AudioRendererHostTest;
127 friend class content::BrowserThread; 128 friend class content::BrowserThread;
128 friend class DeleteTask<AudioRendererHost>; 129 friend class base::DeleteHelper<AudioRendererHost>;
129 friend class MockAudioRendererHost; 130 friend class MockAudioRendererHost;
130 FRIEND_TEST_ALL_PREFIXES(AudioRendererHostTest, CreateMockStream); 131 FRIEND_TEST_ALL_PREFIXES(AudioRendererHostTest, CreateMockStream);
131 FRIEND_TEST_ALL_PREFIXES(AudioRendererHostTest, MockStreamDataConversation); 132 FRIEND_TEST_ALL_PREFIXES(AudioRendererHostTest, MockStreamDataConversation);
132 133
133 virtual ~AudioRendererHost(); 134 virtual ~AudioRendererHost();
134 135
135 // Methods called on IO thread ---------------------------------------------- 136 // Methods called on IO thread ----------------------------------------------
136 137
137 // Audio related IPC message handlers. 138 // Audio related IPC message handlers.
138 // Creates an audio output stream with the specified format. If this call is 139 // Creates an audio output stream with the specified format. If this call is
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 // A map of stream IDs to audio sources. 218 // A map of stream IDs to audio sources.
218 AudioEntryMap audio_entries_; 219 AudioEntryMap audio_entries_;
219 220
220 const content::ResourceContext* resource_context_; 221 const content::ResourceContext* resource_context_;
221 MediaObserver* media_observer_; 222 MediaObserver* media_observer_;
222 223
223 DISALLOW_COPY_AND_ASSIGN(AudioRendererHost); 224 DISALLOW_COPY_AND_ASSIGN(AudioRendererHost);
224 }; 225 };
225 226
226 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_RENDERER_HOST_H_ 227 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_RENDERER_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698