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

Unified Diff: remoting/client/plugin/pepper_audio_player.cc

Issue 2052723002: Adding an interface to allow extention of the audio player for CRD and iOS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing comments in CL. Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/client/plugin/pepper_audio_player.h ('k') | remoting/remoting_srcs.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/client/plugin/pepper_audio_player.cc
diff --git a/remoting/client/plugin/pepper_audio_player.cc b/remoting/client/plugin/pepper_audio_player.cc
index 90e83b549751632972333b38aeb299a983520e50..e8d6b66460a0ff3e13bb026ec4732862a05689b1 100644
--- a/remoting/client/plugin/pepper_audio_player.cc
+++ b/remoting/client/plugin/pepper_audio_player.cc
@@ -15,9 +15,7 @@ const int kFrameSizeMs = 40;
namespace remoting {
PepperAudioPlayer::PepperAudioPlayer(pp::Instance* instance)
- : instance_(instance),
- samples_per_frame_(0) {
-}
+ : instance_(instance), samples_per_frame_(0), weak_factory_(this) {}
PepperAudioPlayer::~PepperAudioPlayer() {
}
@@ -26,6 +24,10 @@ uint32_t PepperAudioPlayer::GetSamplesPerFrame() {
return samples_per_frame_;
}
+base::WeakPtr<PepperAudioPlayer> PepperAudioPlayer::GetWeakPtr() {
+ return weak_factory_.GetWeakPtr();
+}
+
bool PepperAudioPlayer::ResetAudioPlayer(
AudioPacket::SamplingRate sampling_rate) {
PP_AudioSampleRate pp_sampling_rate = PP_AUDIOSAMPLERATE_NONE;
« no previous file with comments | « remoting/client/plugin/pepper_audio_player.h ('k') | remoting/remoting_srcs.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698