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

Unified Diff: remoting/host/screen_recorder.h

Issue 7635005: Properly handle screen recorder shutdown in ChromotingHost. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 9 years, 4 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/chromoting_host.cc ('k') | remoting/host/screen_recorder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/screen_recorder.h
diff --git a/remoting/host/screen_recorder.h b/remoting/host/screen_recorder.h
index 3007aa52917e6f62e8b53e33f82bbea2536a7039..64eb1ad851fd7f95bd35e72f2b14d07d01505e3e 100644
--- a/remoting/host/screen_recorder.h
+++ b/remoting/host/screen_recorder.h
@@ -8,6 +8,7 @@
#include <vector>
#include "base/basictypes.h"
+#include "base/callback.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/message_loop.h"
@@ -85,7 +86,7 @@ class ScreenRecorder : public base::RefCountedThreadSafe<ScreenRecorder> {
// Stop the recording session. |done_task| is executed when recording is fully
// stopped. This object cannot be used again after |task| is executed.
- void Stop(Task* done_task);
+ void Stop(const base::Closure& done_task);
// Set the maximum capture rate. This is denoted by number of updates
// in one second. The actual system may run in a slower rate than the maximum
@@ -114,8 +115,6 @@ class ScreenRecorder : public base::RefCountedThreadSafe<ScreenRecorder> {
// Capturer thread ----------------------------------------------------------
void DoStart();
- void DoStop(Task* done_task);
-
void DoSetMaxRate(double max_rate);
// Hepler method to schedule next capture using the current rate.
@@ -140,7 +139,7 @@ class ScreenRecorder : public base::RefCountedThreadSafe<ScreenRecorder> {
void DoRemoveAllClients();
// Signal network thread to cease activities.
- void DoStopOnNetworkThread(Task* done_task);
+ void DoStopOnNetworkThread(const base::Closure& done_task);
// Callback for the last packet in one update. Deletes |packet| and
// schedules next screen capture.
@@ -151,7 +150,7 @@ class ScreenRecorder : public base::RefCountedThreadSafe<ScreenRecorder> {
void DoEncode(scoped_refptr<CaptureData> capture_data);
// Perform stop operations on encode thread.
- void DoStopOnEncodeThread(Task* done_task);
+ void DoStopOnEncodeThread(const base::Closure& done_task);
// EncodedDataAvailableCallback takes ownership of |packet|.
void EncodedDataAvailableCallback(VideoPacket* packet);
« no previous file with comments | « remoting/host/chromoting_host.cc ('k') | remoting/host/screen_recorder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698