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

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

Issue 10837118: Dead code elimination: scythe.chrome_functions:segment.path %media% edition, round 1. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . 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
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 // AudioInputDeviceManager manages the audio input devices. In particular it 5 // AudioInputDeviceManager manages the audio input devices. In particular it
6 // communicates with MediaStreamManager and AudioInputRendererHost on the 6 // communicates with MediaStreamManager and AudioInputRendererHost on the
7 // browser IO thread, handles queries like enumerate/open/close from 7 // browser IO thread, handles queries like enumerate/open/close from
8 // MediaStreamManager and start/stop from AudioInputRendererHost. 8 // MediaStreamManager and start/stop from AudioInputRendererHost.
9 // The work for enumerate/open/close is handled asynchronously on Media Stream 9 // The work for enumerate/open/close is handled asynchronously on Media Stream
10 // device thread, while start/stop are synchronous on the IO thread. 10 // device thread, while start/stop are synchronous on the IO thread.
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 61
62 // Executed on media stream device thread. 62 // Executed on media stream device thread.
63 void EnumerateOnDeviceThread(); 63 void EnumerateOnDeviceThread();
64 void OpenOnDeviceThread(int session_id, const StreamDeviceInfo& device); 64 void OpenOnDeviceThread(int session_id, const StreamDeviceInfo& device);
65 void CloseOnDeviceThread(int session_id); 65 void CloseOnDeviceThread(int session_id);
66 66
67 // Executed on IO thread to call Listener. 67 // Executed on IO thread to call Listener.
68 void DevicesEnumeratedOnIOThread(StreamDeviceInfoArray* devices); 68 void DevicesEnumeratedOnIOThread(StreamDeviceInfoArray* devices);
69 void OpenedOnIOThread(int session_id); 69 void OpenedOnIOThread(int session_id);
70 void ClosedOnIOThread(int session_id); 70 void ClosedOnIOThread(int session_id);
71 void ErrorOnIOThread(int session_id, MediaStreamProviderError error);
72 71
73 bool IsOnDeviceThread() const; 72 bool IsOnDeviceThread() const;
74 73
75 // Only accessed on Browser::IO thread. 74 // Only accessed on Browser::IO thread.
76 MediaStreamProviderListener* listener_; 75 MediaStreamProviderListener* listener_;
77 int next_capture_session_id_; 76 int next_capture_session_id_;
78 typedef std::map<int, AudioInputDeviceManagerEventHandler*> EventHandlerMap; 77 typedef std::map<int, AudioInputDeviceManagerEventHandler*> EventHandlerMap;
79 EventHandlerMap event_handlers_; 78 EventHandlerMap event_handlers_;
80 79
81 // Only accessed from media stream device thread. 80 // Only accessed from media stream device thread.
82 typedef std::map<int, media::AudioDeviceName> AudioInputDeviceMap; 81 typedef std::map<int, media::AudioDeviceName> AudioInputDeviceMap;
83 AudioInputDeviceMap devices_; 82 AudioInputDeviceMap devices_;
84 media::AudioManager* audio_manager_; 83 media::AudioManager* audio_manager_;
85 84
86 // The message loop of media stream device thread that this object runs on. 85 // The message loop of media stream device thread that this object runs on.
87 scoped_refptr<base::MessageLoopProxy> device_loop_; 86 scoped_refptr<base::MessageLoopProxy> device_loop_;
88 87
89 DISALLOW_COPY_AND_ASSIGN(AudioInputDeviceManager); 88 DISALLOW_COPY_AND_ASSIGN(AudioInputDeviceManager);
90 }; 89 };
91 90
92 } // namespace media_stream 91 } // namespace media_stream
93 92
94 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_INPUT_DEVICE_MANAGER_H_ 93 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_INPUT_DEVICE_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698