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

Unified Diff: remoting/protocol/rtp_reader.h

Issue 8116021: Switch remoting/protocol to new callbacks (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/protocol/rtcp_writer.cc ('k') | remoting/protocol/rtp_reader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/rtp_reader.h
diff --git a/remoting/protocol/rtp_reader.h b/remoting/protocol/rtp_reader.h
index d932d481c1eb3d10e92661f795fb1f0766602db6..175c1081cbbb6144f6a59de238d0a4ca12ea71d4 100644
--- a/remoting/protocol/rtp_reader.h
+++ b/remoting/protocol/rtp_reader.h
@@ -5,6 +5,7 @@
#ifndef REMOTING_PROTOCOL_RTP_READER_H_
#define REMOTING_PROTOCOL_RTP_READER_H_
+#include "base/callback.h"
#include "base/memory/scoped_ptr.h"
#include "remoting/base/compound_buffer.h"
#include "remoting/protocol/rtp_utils.h"
@@ -52,13 +53,13 @@ class RtpReader : public SocketReaderBase {
// The OnMessageCallback is called whenever a new message is received.
// Ownership of the message is passed the callback.
- typedef Callback1<const RtpPacket*>::Type OnMessageCallback;
+ typedef base::Callback<void(const RtpPacket*)> OnMessageCallback;
// Initialize the reader and start reading. Must be called on the thread
// |socket| belongs to. The callback will be called when a new message is
// received. RtpReader owns |on_message_callback|, doesn't own
// |socket|.
- void Init(net::Socket* socket, OnMessageCallback* on_message_callback);
+ void Init(net::Socket* socket, const OnMessageCallback& on_message_callback);
void GetReceiverReport(RtcpReceiverReport* report);
@@ -68,7 +69,7 @@ class RtpReader : public SocketReaderBase {
virtual void OnDataReceived(net::IOBuffer* buffer, int data_size);
private:
- scoped_ptr<OnMessageCallback> on_message_callback_;
+ OnMessageCallback on_message_callback_;
uint16 max_sequence_number_;
uint16 wrap_around_count_;
« no previous file with comments | « remoting/protocol/rtcp_writer.cc ('k') | remoting/protocol/rtp_reader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698