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

Side by Side Diff: content/renderer/media/webrtc_audio_capturer_sink_owner.h

Issue 21183002: Adding key press detection in the browser process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 #ifndef CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_CAPTURER_SINK_OWNER_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_CAPTURER_SINK_OWNER_H_
6 #define CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_CAPTURER_SINK_OWNER_H_ 6 #define CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_CAPTURER_SINK_OWNER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 13 matching lines...) Expand all
24 explicit WebRtcAudioCapturerSinkOwner(WebRtcAudioCapturerSink* sink); 24 explicit WebRtcAudioCapturerSinkOwner(WebRtcAudioCapturerSink* sink);
25 25
26 // WebRtcAudioCapturerSink implementation. 26 // WebRtcAudioCapturerSink implementation.
27 virtual int CaptureData(const std::vector<int>& channels, 27 virtual int CaptureData(const std::vector<int>& channels,
28 const int16* audio_data, 28 const int16* audio_data,
29 int sample_rate, 29 int sample_rate,
30 int number_of_channels, 30 int number_of_channels,
31 int number_of_frames, 31 int number_of_frames,
32 int audio_delay_milliseconds, 32 int audio_delay_milliseconds,
33 int current_volume, 33 int current_volume,
34 bool need_audio_processing) OVERRIDE; 34 bool need_audio_processing,
35 bool key_pressed) OVERRIDE;
35 36
36 virtual void SetCaptureFormat(const media::AudioParameters& params) OVERRIDE; 37 virtual void SetCaptureFormat(const media::AudioParameters& params) OVERRIDE;
37 38
38 bool IsEqual(const WebRtcAudioCapturerSink* other) const; 39 bool IsEqual(const WebRtcAudioCapturerSink* other) const;
39 void Reset(); 40 void Reset();
40 41
41 // Wrapper which allows to use std::find_if() when adding and removing 42 // Wrapper which allows to use std::find_if() when adding and removing
42 // sinks to/from the list. 43 // sinks to/from the list.
43 struct WrapsSink { 44 struct WrapsSink {
44 WrapsSink(WebRtcAudioCapturerSink* sink) : sink_(sink) {} 45 WrapsSink(WebRtcAudioCapturerSink* sink) : sink_(sink) {}
(...skipping 11 matching lines...) Expand all
56 friend class base::RefCountedThreadSafe<WebRtcAudioCapturerSinkOwner>; 57 friend class base::RefCountedThreadSafe<WebRtcAudioCapturerSinkOwner>;
57 WebRtcAudioCapturerSink* delegate_; 58 WebRtcAudioCapturerSink* delegate_;
58 mutable base::Lock lock_; 59 mutable base::Lock lock_;
59 60
60 DISALLOW_COPY_AND_ASSIGN(WebRtcAudioCapturerSinkOwner); 61 DISALLOW_COPY_AND_ASSIGN(WebRtcAudioCapturerSinkOwner);
61 }; 62 };
62 63
63 } // namespace content 64 } // namespace content
64 65
65 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_CAPTURER_SINK_OWNER_H_ 66 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_CAPTURER_SINK_OWNER_H_
OLDNEW
« no previous file with comments | « content/renderer/media/webrtc_audio_capturer.cc ('k') | content/renderer/media/webrtc_audio_capturer_sink_owner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698