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

Unified Diff: remoting/host/capturer_linux.cc

Issue 8493020: Move code in src/remoting to the new callbacks. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: - Created 9 years, 1 month 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/capturer_fake_ascii.cc ('k') | remoting/host/capturer_mac.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/capturer_linux.cc
diff --git a/remoting/host/capturer_linux.cc b/remoting/host/capturer_linux.cc
index 062f259796609808a45ddf49cbafede1a7122573..239aa169a43c9583a9a470ba2e87065bce6234a7 100644
--- a/remoting/host/capturer_linux.cc
+++ b/remoting/host/capturer_linux.cc
@@ -79,8 +79,8 @@ class CapturerLinux : public Capturer {
virtual void InvalidateRegion(const SkRegion& invalid_region) OVERRIDE;
virtual void InvalidateScreen(const SkISize& size) OVERRIDE;
virtual void InvalidateFullScreen() OVERRIDE;
- virtual void CaptureInvalidRegion(CaptureCompletedCallback* callback)
- OVERRIDE;
+ virtual void CaptureInvalidRegion(
+ const CaptureCompletedCallback& callback) OVERRIDE;
virtual const SkISize& size_most_recent() const OVERRIDE;
private:
@@ -264,9 +264,7 @@ void CapturerLinux::InvalidateFullScreen() {
}
void CapturerLinux::CaptureInvalidRegion(
- CaptureCompletedCallback* callback) {
- scoped_ptr<CaptureCompletedCallback> callback_deleter(callback);
-
+ const CaptureCompletedCallback& callback) {
// TODO(lambroslambrou): In the non-DAMAGE case, there should be no need
// for any X event processing in this class.
ProcessPendingXEvents();
@@ -286,7 +284,7 @@ void CapturerLinux::CaptureInvalidRegion(
current_buffer_ = (current_buffer_ + 1) % kNumBuffers;
helper_.set_size_most_recent(capture_data->size());
- callback->Run(capture_data);
+ callback.Run(capture_data);
}
void CapturerLinux::ProcessPendingXEvents() {
« no previous file with comments | « remoting/host/capturer_fake_ascii.cc ('k') | remoting/host/capturer_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698