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

Unified Diff: remoting/base/encoder_vp8.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/base/encoder_vp8.h ('k') | remoting/base/encoder_vp8_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/base/encoder_vp8.cc
diff --git a/remoting/base/encoder_vp8.cc b/remoting/base/encoder_vp8.cc
index 42369e89d3b8a2d483dff2eaee8683250149e03e..631782109af50e3e990ac10e3a76ed4969ec7e1e 100644
--- a/remoting/base/encoder_vp8.cc
+++ b/remoting/base/encoder_vp8.cc
@@ -216,7 +216,7 @@ void EncoderVp8::PrepareActiveMap(const RectVector& updated_rects) {
void EncoderVp8::Encode(scoped_refptr<CaptureData> capture_data,
bool key_frame,
- DataAvailableCallback* data_available_callback) {
+ const DataAvailableCallback& data_available_callback) {
if (!initialized_ || (capture_data->size() != size_)) {
bool ret = Init(capture_data->size());
// TODO(hclam): Handle error better.
@@ -293,8 +293,7 @@ void EncoderVp8::Encode(scoped_refptr<CaptureData> capture_data,
rect->set_height(updated_rects[i].height());
}
- data_available_callback->Run(message);
- delete data_available_callback;
+ data_available_callback.Run(message);
}
} // namespace remoting
« no previous file with comments | « remoting/base/encoder_vp8.h ('k') | remoting/base/encoder_vp8_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698