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

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

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/chromoting_instance.cc ('k') | remoting/client/plugin/pepper_audio_player.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/client/plugin/pepper_audio_player.h
diff --git a/remoting/client/plugin/pepper_audio_player.h b/remoting/client/plugin/pepper_audio_player.h
index eef697c5f67f45d2a97a1c0a765224eb0ed60159..4a378053c83477c539d1f44f052090d9e4403c10 100644
--- a/remoting/client/plugin/pepper_audio_player.h
+++ b/remoting/client/plugin/pepper_audio_player.h
@@ -9,6 +9,7 @@
#include "base/callback.h"
#include "base/macros.h"
+#include "base/memory/weak_ptr.h"
#include "ppapi/cpp/audio.h"
#include "ppapi/cpp/instance.h"
#include "remoting/client/audio_player.h"
@@ -25,6 +26,8 @@ class PepperAudioPlayer : public AudioPlayer {
bool ResetAudioPlayer(AudioPacket::SamplingRate sampling_rate) override;
+ base::WeakPtr<PepperAudioPlayer> GetWeakPtr();
+
private:
pp::Instance* instance_;
pp::Audio audio_;
@@ -32,6 +35,8 @@ class PepperAudioPlayer : public AudioPlayer {
// The count of sample frames per channel in an audio buffer.
uint32_t samples_per_frame_;
+ base::WeakPtrFactory<PepperAudioPlayer> weak_factory_;
+
DISALLOW_COPY_AND_ASSIGN(PepperAudioPlayer);
};
« no previous file with comments | « remoting/client/plugin/chromoting_instance.cc ('k') | remoting/client/plugin/pepper_audio_player.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698