summaryrefslogtreecommitdiffstats
path: root/remoting/client/chromoting_client.cc
diff options
context:
space:
mode:
Diffstat (limited to 'remoting/client/chromoting_client.cc')
-rw-r--r--remoting/client/chromoting_client.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/remoting/client/chromoting_client.cc b/remoting/client/chromoting_client.cc
index e50d95d3..f07b5e8 100644
--- a/remoting/client/chromoting_client.cc
+++ b/remoting/client/chromoting_client.cc
@@ -28,7 +28,7 @@ ChromotingClient::ChromotingClient(const ClientConfig& config,
ChromotingView* view,
RectangleUpdateDecoder* rectangle_decoder,
InputHandler* input_handler,
- Task* client_done)
+ const base::Closure& client_done)
: config_(config),
context_(context),
connection_(connection),
@@ -81,8 +81,9 @@ void ChromotingClient::OnDisconnected(const base::Closure& shutdown_task) {
}
void ChromotingClient::ClientDone() {
- if (client_done_ != NULL) {
+ if (!client_done_.is_null()) {
message_loop()->PostTask(FROM_HERE, client_done_);
+ client_done_.Reset();
}
}
@@ -152,8 +153,8 @@ void ChromotingClient::DispatchPacket() {
decode_start = base::Time::Now();
rectangle_decoder_->DecodePacket(
- packet, NewRunnableMethod(this, &ChromotingClient::OnPacketDone,
- last_packet, decode_start));
+ packet, base::Bind(&ChromotingClient::OnPacketDone,
+ base::Unretained(this), last_packet, decode_start));
}
void ChromotingClient::OnConnectionState(