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

Side by Side Diff: content/browser/media/capture/web_contents_audio_input_stream.h

Issue 667943003: Standardize usage of virtual/override/final in content/browser/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 // An AudioInputStream which provides a loop-back of all audio output generated 5 // An AudioInputStream which provides a loop-back of all audio output generated
6 // by the entire RenderFrame tree associated with a WebContents instance. The 6 // by the entire RenderFrame tree associated with a WebContents instance. The
7 // single stream of data is produced by format-converting and mixing all audio 7 // single stream of data is produced by format-converting and mixing all audio
8 // output streams. As the RenderFrameHost tree mutates (e.g., due to page 8 // output streams. As the RenderFrameHost tree mutates (e.g., due to page
9 // navigations, or crashes/reloads), the stream will continue without 9 // navigations, or crashes/reloads), the stream will continue without
10 // interruption. In other words, WebContentsAudioInputStream provides tab-level 10 // interruption. In other words, WebContentsAudioInputStream provides tab-level
(...skipping 19 matching lines...) Expand all
30 30
31 namespace content { 31 namespace content {
32 32
33 class AudioMirroringManager; 33 class AudioMirroringManager;
34 class WebContentsTracker; 34 class WebContentsTracker;
35 35
36 class CONTENT_EXPORT WebContentsAudioInputStream 36 class CONTENT_EXPORT WebContentsAudioInputStream
37 : NON_EXPORTED_BASE(public media::AudioInputStream) { 37 : NON_EXPORTED_BASE(public media::AudioInputStream) {
38 public: 38 public:
39 // media::AudioInputStream implementation 39 // media::AudioInputStream implementation
40 virtual bool Open() override; 40 bool Open() override;
41 virtual void Start(AudioInputCallback* callback) override; 41 void Start(AudioInputCallback* callback) override;
42 virtual void Stop() override; 42 void Stop() override;
43 virtual void Close() override; 43 void Close() override;
44 virtual double GetMaxVolume() override; 44 double GetMaxVolume() override;
45 virtual void SetVolume(double volume) override; 45 void SetVolume(double volume) override;
46 virtual double GetVolume() override; 46 double GetVolume() override;
47 virtual void SetAutomaticGainControl(bool enabled) override; 47 void SetAutomaticGainControl(bool enabled) override;
48 virtual bool GetAutomaticGainControl() override; 48 bool GetAutomaticGainControl() override;
49 virtual bool IsMuted() override; 49 bool IsMuted() override;
50 50
51 // Create a new audio mirroring session, or return NULL on error. |device_id| 51 // Create a new audio mirroring session, or return NULL on error. |device_id|
52 // should be in the format accepted by 52 // should be in the format accepted by
53 // WebContentsCaptureUtil::ExtractTabCaptureTarget(). The caller must 53 // WebContentsCaptureUtil::ExtractTabCaptureTarget(). The caller must
54 // guarantee Close() is called on the returned object so that it may 54 // guarantee Close() is called on the returned object so that it may
55 // self-destruct. 55 // self-destruct.
56 // |worker_task_runner| is the task runner on which AudioInputCallback methods 56 // |worker_task_runner| is the task runner on which AudioInputCallback methods
57 // are called and may or may not be the single thread that invokes the 57 // are called and may or may not be the single thread that invokes the
58 // AudioInputStream methods. 58 // AudioInputStream methods.
59 static WebContentsAudioInputStream* Create( 59 static WebContentsAudioInputStream* Create(
(...skipping 11 matching lines...) Expand all
71 // AudioMirroringManager on the IO thread, the WebContentsTracker on the UI 71 // AudioMirroringManager on the IO thread, the WebContentsTracker on the UI
72 // thread, and the VirtualAudioOuputStreams on the audio thread. 72 // thread, and the VirtualAudioOuputStreams on the audio thread.
73 class Impl; 73 class Impl;
74 74
75 WebContentsAudioInputStream( 75 WebContentsAudioInputStream(
76 int render_process_id, int main_render_frame_id, 76 int render_process_id, int main_render_frame_id,
77 AudioMirroringManager* mirroring_manager, 77 AudioMirroringManager* mirroring_manager,
78 const scoped_refptr<WebContentsTracker>& tracker, 78 const scoped_refptr<WebContentsTracker>& tracker,
79 media::VirtualAudioInputStream* mixer_stream); 79 media::VirtualAudioInputStream* mixer_stream);
80 80
81 virtual ~WebContentsAudioInputStream(); 81 ~WebContentsAudioInputStream() override;
82 82
83 scoped_refptr<Impl> impl_; 83 scoped_refptr<Impl> impl_;
84 84
85 DISALLOW_COPY_AND_ASSIGN(WebContentsAudioInputStream); 85 DISALLOW_COPY_AND_ASSIGN(WebContentsAudioInputStream);
86 }; 86 };
87 87
88 } // namespace content 88 } // namespace content
89 89
90 #endif // CONTENT_BROWSER_MEDIA_CAPTURE_WEB_CONTENTS_AUDIO_INPUT_STREAM_H_ 90 #endif // CONTENT_BROWSER_MEDIA_CAPTURE_WEB_CONTENTS_AUDIO_INPUT_STREAM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698