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

Unified Diff: ppapi/proxy/websocket_resource.cc

Issue 10909244: PPAPI: Get TrackedCallback ready for running on non-main threads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged. Created 8 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 | « ppapi/proxy/printing_resource.cc ('k') | ppapi/shared_impl/ppb_audio_input_shared.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/websocket_resource.cc
diff --git a/ppapi/proxy/websocket_resource.cc b/ppapi/proxy/websocket_resource.cc
index eb4176f5e2815bc15a4f4e626ad6b69fc42eda13..c45de909b55e6b36744d513c90375e450ba9ef9c 100644
--- a/ppapi/proxy/websocket_resource.cc
+++ b/ppapi/proxy/websocket_resource.cc
@@ -371,7 +371,7 @@ void WebSocketResource::OnPluginMsgConnectReply(
protocol_ = new StringVar(protocol);
url_ = new StringVar(url);
}
- TrackedCallback::ClearAndRun(&connect_callback_, params.result());
+ connect_callback_->Run(params.result());
}
void WebSocketResource::OnPluginMsgCloseReply(
@@ -412,7 +412,7 @@ void WebSocketResource::OnPluginMsgReceiveTextReply(
if (!TrackedCallback::IsPending(receive_callback_))
return;
- TrackedCallback::ClearAndRun(&receive_callback_, DoReceive());
+ receive_callback_->Run(DoReceive());
}
void WebSocketResource::OnPluginMsgReceiveBinaryReply(
@@ -432,7 +432,7 @@ void WebSocketResource::OnPluginMsgReceiveBinaryReply(
if (!TrackedCallback::IsPending(receive_callback_))
return;
- TrackedCallback::ClearAndRun(&receive_callback_, DoReceive());
+ receive_callback_->Run(DoReceive());
}
void WebSocketResource::OnPluginMsgErrorReply(
@@ -445,7 +445,7 @@ void WebSocketResource::OnPluginMsgErrorReply(
// No more text or binary messages will be received. If there is ongoing
// ReceiveMessage(), we must invoke the callback with error code here.
receive_callback_var_ = NULL;
- TrackedCallback::ClearAndRun(&receive_callback_, PP_ERROR_FAILED);
+ receive_callback_->Run(PP_ERROR_FAILED);
}
void WebSocketResource::OnPluginMsgBufferedAmountReply(
« no previous file with comments | « ppapi/proxy/printing_resource.cc ('k') | ppapi/shared_impl/ppb_audio_input_shared.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698