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

Unified Diff: remoting/host/screen_recorder.cc

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/host/client_session_unittest.cc ('k') | remoting/host/screen_recorder_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/screen_recorder.cc
diff --git a/remoting/host/screen_recorder.cc b/remoting/host/screen_recorder.cc
index cca7c37341ab5f4b093e7e454da1b9351f9efefa..98266e3cf02bf768fe5cd5ec1f5eca3e2fc39a76 100644
--- a/remoting/host/screen_recorder.cc
+++ b/remoting/host/screen_recorder.cc
@@ -268,17 +268,16 @@ void ScreenRecorder::DoSendVideoPacket(VideoPacket* packet) {
for (ConnectionToClientList::const_iterator i = connections_.begin();
i < connections_.end(); ++i) {
- Task* done_task = NULL;
+ base::Closure done_task;
// Call FrameSentCallback() only for the last packet in the first
// connection.
if (last && i == connections_.begin()) {
- done_task = NewRunnableMethod(this, &ScreenRecorder::FrameSentCallback,
- packet);
+ done_task = base::Bind(&ScreenRecorder::FrameSentCallback, this, packet);
} else {
// TODO(hclam): Fix this code since it causes multiple deletion if there's
// more than one connection.
- done_task = new DeleteTask<VideoPacket>(packet);
+ done_task = base::Bind(&DeletePointer<VideoPacket>, packet);
}
(*i)->video_stub()->ProcessVideoPacket(packet, done_task);
« no previous file with comments | « remoting/host/client_session_unittest.cc ('k') | remoting/host/screen_recorder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698