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

Side by Side Diff: content/browser/renderer_host/media/audio_input_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 // AudioInputRendererHost serves audio related requests from audio capturer 5 // AudioInputRendererHost serves audio related requests from audio capturer
6 // which lives inside the render process and provide access to audio hardware. 6 // which lives inside the render process and provide access to audio hardware.
7 // 7 //
8 // OnCreateStream() request is only available in the low latency mode. It will 8 // OnCreateStream() request is only available in the low latency mode. It will
9 // creates a shared memory, a SyncWriter and a AudioInputController for the 9 // creates a shared memory, a SyncWriter and a AudioInputController for the
10 // input stream. 10 // input stream.
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 #ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_INPUT_RENDERER_HOST_H_ 54 #ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_INPUT_RENDERER_HOST_H_
55 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_INPUT_RENDERER_HOST_H_ 55 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_INPUT_RENDERER_HOST_H_
56 #pragma once 56 #pragma once
57 57
58 #include <map> 58 #include <map>
59 59
60 #include "base/compiler_specific.h" 60 #include "base/compiler_specific.h"
61 #include "base/gtest_prod_util.h" 61 #include "base/gtest_prod_util.h"
62 #include "base/memory/ref_counted.h" 62 #include "base/memory/ref_counted.h"
63 #include "base/memory/scoped_ptr.h" 63 #include "base/memory/scoped_ptr.h"
64 #include "base/message_loop_helpers.h"
64 #include "base/process.h" 65 #include "base/process.h"
65 #include "base/shared_memory.h" 66 #include "base/shared_memory.h"
66 #include "content/browser/renderer_host/media/audio_input_device_manager_event_h andler.h" 67 #include "content/browser/renderer_host/media/audio_input_device_manager_event_h andler.h"
67 #include "content/public/browser/browser_message_filter.h" 68 #include "content/public/browser/browser_message_filter.h"
68 #include "content/public/browser/browser_thread.h" 69 #include "content/public/browser/browser_thread.h"
69 #include "media/audio/audio_input_controller.h" 70 #include "media/audio/audio_input_controller.h"
70 #include "media/audio/audio_io.h" 71 #include "media/audio/audio_io.h"
71 #include "media/audio/simple_sources.h" 72 #include "media/audio/simple_sources.h"
72 73
73 namespace content { 74 namespace content {
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 uint32 size) OVERRIDE; 124 uint32 size) OVERRIDE;
124 125
125 // media_stream::AudioInputDeviceManagerEventHandler implementation. 126 // media_stream::AudioInputDeviceManagerEventHandler implementation.
126 virtual void OnDeviceStarted(int session_id, 127 virtual void OnDeviceStarted(int session_id,
127 const std::string& device_id) OVERRIDE; 128 const std::string& device_id) OVERRIDE;
128 virtual void OnDeviceStopped(int session_id) OVERRIDE; 129 virtual void OnDeviceStopped(int session_id) OVERRIDE;
129 130
130 private: 131 private:
131 // TODO(henrika): extend test suite (compare AudioRenderHost) 132 // TODO(henrika): extend test suite (compare AudioRenderHost)
132 friend class content::BrowserThread; 133 friend class content::BrowserThread;
133 friend class DeleteTask<AudioInputRendererHost>; 134 friend class base::DeleteHelper<AudioInputRendererHost>;
134 135
135 virtual ~AudioInputRendererHost(); 136 virtual ~AudioInputRendererHost();
136 137
137 // Methods called on IO thread ---------------------------------------------- 138 // Methods called on IO thread ----------------------------------------------
138 139
139 // Start the audio input device with the session id. If the device 140 // Start the audio input device with the session id. If the device
140 // starts successfully, it will trigger OnDeviceStarted() callback. 141 // starts successfully, it will trigger OnDeviceStarted() callback.
141 void OnStartDevice(int stream_id, int session_id); 142 void OnStartDevice(int stream_id, int session_id);
142 143
143 // Audio related IPC message handlers. 144 // Audio related IPC message handlers.
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 AudioEntryMap audio_entries_; 216 AudioEntryMap audio_entries_;
216 217
217 // A map of session IDs to audio session sources. 218 // A map of session IDs to audio session sources.
218 typedef std::map<int, int> SessionEntryMap; 219 typedef std::map<int, int> SessionEntryMap;
219 SessionEntryMap session_entries_; 220 SessionEntryMap session_entries_;
220 221
221 DISALLOW_COPY_AND_ASSIGN(AudioInputRendererHost); 222 DISALLOW_COPY_AND_ASSIGN(AudioInputRendererHost);
222 }; 223 };
223 224
224 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_INPUT_RENDERER_HOST_H_ 225 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_INPUT_RENDERER_HOST_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/gpu_message_filter.h ('k') | content/browser/renderer_host/media/audio_renderer_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698