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

Unified Diff: remoting/host/screen_recorder.h

Issue 9720019: Use scoped_ptr<> to pass ownership in more places. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 8 years, 9 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
Index: remoting/host/screen_recorder.h
diff --git a/remoting/host/screen_recorder.h b/remoting/host/screen_recorder.h
index 95e338a16a2052dac4fb58b8a1acddfe3219ddf2..fb2caf5653b54f0db1a1b96296dc88c0a49a6430 100644
--- a/remoting/host/screen_recorder.h
+++ b/remoting/host/screen_recorder.h
@@ -125,9 +125,7 @@ class ScreenRecorder : public base::RefCountedThreadSafe<ScreenRecorder> {
// Network thread -----------------------------------------------------------
- // DoSendVideoPacket takes ownership of the |packet| and is responsible
- // for deleting it.
- void DoSendVideoPacket(VideoPacket* packet);
+ void DoSendVideoPacket(scoped_ptr<VideoPacket> packet);
void DoSendInit(scoped_refptr<protocol::ConnectionToClient> connection,
int width, int height);
@@ -135,9 +133,8 @@ class ScreenRecorder : public base::RefCountedThreadSafe<ScreenRecorder> {
// Signal network thread to cease activities.
void DoStopOnNetworkThread(const base::Closure& done_task);
- // Callback for the last packet in one update. Deletes |packet| and
- // schedules next screen capture.
- void FrameSentCallback(VideoPacket* packet);
+ // Callback for VideoStub::ProcessVideoPacket().
+ void VideoPacketSentCallback(scoped_ptr<VideoPacket> packet);
// Encoder thread -----------------------------------------------------------
@@ -146,8 +143,7 @@ class ScreenRecorder : public base::RefCountedThreadSafe<ScreenRecorder> {
// Perform stop operations on encode thread.
void DoStopOnEncodeThread(const base::Closure& done_task);
- // EncodedDataAvailableCallback takes ownership of |packet|.
- void EncodedDataAvailableCallback(VideoPacket* packet);
+ void EncodedDataAvailableCallback(scoped_ptr<VideoPacket> packet);
void SendVideoPacket(VideoPacket* packet);
// Message loops used by this class.

Powered by Google App Engine
This is Rietveld 408576698