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

Unified Diff: remoting/protocol/audio_reader.cc

Issue 1655433002: Remove done notifications from incoming message handlers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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/protocol/audio_reader.h ('k') | remoting/protocol/channel_multiplexer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/audio_reader.cc
diff --git a/remoting/protocol/audio_reader.cc b/remoting/protocol/audio_reader.cc
index 02f8eb1c3e7e1bc64f43f37c322ddb990ad90c60..d197a83d57d81aa45a6473d45ce80de310088d20 100644
--- a/remoting/protocol/audio_reader.cc
+++ b/remoting/protocol/audio_reader.cc
@@ -15,12 +15,15 @@ namespace protocol {
AudioReader::AudioReader(AudioStub* audio_stub)
: ChannelDispatcherBase(kAudioChannelName),
- parser_(base::Bind(&AudioStub::ProcessAudioPacket,
- base::Unretained(audio_stub)),
- reader()) {
-}
+ audio_stub_(audio_stub),
+ parser_(base::Bind(&AudioReader::OnAudioPacket, base::Unretained(this)),
+ reader()) {}
+
+AudioReader::~AudioReader() {}
-AudioReader::~AudioReader() {
+void AudioReader::OnAudioPacket(scoped_ptr<AudioPacket> audio_packet) {
+ audio_stub_->ProcessAudioPacket(std::move(audio_packet),
+ base::Bind(&base::DoNothing));
}
} // namespace protocol
« no previous file with comments | « remoting/protocol/audio_reader.h ('k') | remoting/protocol/channel_multiplexer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698