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

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

Issue 701103002: Remove pure-virtual MediaStreamProvider::Unregister method and make overrides non-virtual. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
« no previous file with comments | « no previous file | content/browser/renderer_host/media/media_stream_provider.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 // 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 7 // browser IO thread, handles queries like
8 // enumerate/open/close/GetOpenedDeviceInfoById from MediaStreamManager and 8 // enumerate/open/close/GetOpenedDeviceInfoById from MediaStreamManager and
9 // GetOpenedDeviceInfoById from AudioInputRendererHost. 9 // GetOpenedDeviceInfoById from AudioInputRendererHost.
10 // The work for enumerate/open/close is handled asynchronously on Media Stream 10 // The work for enumerate/open/close is handled asynchronously on Media Stream
(...skipping 26 matching lines...) Expand all
37 // AudioInputDeviceManager before MediaStream is implemented. 37 // AudioInputDeviceManager before MediaStream is implemented.
38 // TODO(xians): Remove it when the webrtc unittest does not need it any more. 38 // TODO(xians): Remove it when the webrtc unittest does not need it any more.
39 static const int kFakeOpenSessionId; 39 static const int kFakeOpenSessionId;
40 40
41 explicit AudioInputDeviceManager(media::AudioManager* audio_manager); 41 explicit AudioInputDeviceManager(media::AudioManager* audio_manager);
42 42
43 // Gets the opened device info by |session_id|. Returns NULL if the device 43 // Gets the opened device info by |session_id|. Returns NULL if the device
44 // is not opened, otherwise the opened device. Called on IO thread. 44 // is not opened, otherwise the opened device. Called on IO thread.
45 const StreamDeviceInfo* GetOpenedDeviceInfoById(int session_id); 45 const StreamDeviceInfo* GetOpenedDeviceInfoById(int session_id);
46 46
47 void Unregister();
48
47 // MediaStreamProvider implementation, called on IO thread. 49 // MediaStreamProvider implementation, called on IO thread.
48 void Register(MediaStreamProviderListener* listener, 50 void Register(MediaStreamProviderListener* listener,
49 const scoped_refptr<base::SingleThreadTaskRunner>& 51 const scoped_refptr<base::SingleThreadTaskRunner>&
50 device_task_runner) override; 52 device_task_runner) override;
51 void Unregister() override;
52 void EnumerateDevices(MediaStreamType stream_type) override; 53 void EnumerateDevices(MediaStreamType stream_type) override;
53 int Open(const StreamDeviceInfo& device) override; 54 int Open(const StreamDeviceInfo& device) override;
54 void Close(int session_id) override; 55 void Close(int session_id) override;
55 56
56 void UseFakeDevice(); 57 void UseFakeDevice();
57 bool ShouldUseFakeDevice() const; 58 bool ShouldUseFakeDevice() const;
58 59
59 #if defined(OS_CHROMEOS) 60 #if defined(OS_CHROMEOS)
60 // Registers and unregisters that a stream using keyboard mic has been opened 61 // Registers and unregisters that a stream using keyboard mic has been opened
61 // or closed. Keeps count of how many such streams are open and activates and 62 // or closed. Keeps count of how many such streams are open and activates and
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 119
119 // The message loop of media stream device thread that this object runs on. 120 // The message loop of media stream device thread that this object runs on.
120 scoped_refptr<base::SingleThreadTaskRunner> device_task_runner_; 121 scoped_refptr<base::SingleThreadTaskRunner> device_task_runner_;
121 122
122 DISALLOW_COPY_AND_ASSIGN(AudioInputDeviceManager); 123 DISALLOW_COPY_AND_ASSIGN(AudioInputDeviceManager);
123 }; 124 };
124 125
125 } // namespace content 126 } // namespace content
126 127
127 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_INPUT_DEVICE_MANAGER_H_ 128 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_INPUT_DEVICE_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/media/media_stream_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698