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

Unified Diff: ppapi/thunk/ppb_websocket_api.h

Issue 10081020: PPAPI: Make blocking completion callbacks work. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: export AssertLockHeld Created 8 years, 6 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 | « ppapi/thunk/ppb_video_decoder_thunk.cc ('k') | ppapi/thunk/ppb_websocket_thunk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/thunk/ppb_websocket_api.h
diff --git a/ppapi/thunk/ppb_websocket_api.h b/ppapi/thunk/ppb_websocket_api.h
index 04fc9604beb71c5d054e092a7070bf272cd6aa17..e5b7791f5c88825daae52fd1cb63b18ca5d09379 100644
--- a/ppapi/thunk/ppb_websocket_api.h
+++ b/ppapi/thunk/ppb_websocket_api.h
@@ -5,10 +5,14 @@
#ifndef PPAPI_THUNK_WEBSOCKET_API_H_
#define PPAPI_THUNK_WEBSOCKET_API_H_
+#include "base/memory/ref_counted.h"
#include "ppapi/c/pp_completion_callback.h"
#include "ppapi/c/ppb_websocket.h"
namespace ppapi {
+
+class TrackedCallback;
+
namespace thunk {
// Some arguments and attributes are based on The WebSocket Protocol and The
@@ -25,19 +29,19 @@ class PPB_WebSocket_API {
virtual int32_t Connect(PP_Var url,
const PP_Var protocols[],
uint32_t protocol_count,
- PP_CompletionCallback callback) = 0;
+ scoped_refptr<TrackedCallback> callback) = 0;
// Closes the established connection with specified |code| and |reason|.
// Returns an int32_t error code from pp_errors.h.
virtual int32_t Close(uint16_t code,
PP_Var reason,
- PP_CompletionCallback callback) = 0;
+ scoped_refptr<TrackedCallback> callback) = 0;
// Receives a message from the WebSocket server. Caller must keep specified
// |message| object as valid until completion callback is invoked. Returns an
// int32_t error code from pp_errors.h.
virtual int32_t ReceiveMessage(PP_Var* message,
- PP_CompletionCallback callback) = 0;
+ scoped_refptr<TrackedCallback> callback) = 0;
// Sends a message to the WebSocket server. Returns an int32_t error code
// from pp_errors.h.
« no previous file with comments | « ppapi/thunk/ppb_video_decoder_thunk.cc ('k') | ppapi/thunk/ppb_websocket_thunk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698