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

Unified Diff: ppapi/native_client/src/shared/ppapi_proxy/plugin_callback.h

Issue 9227008: WebSocket Pepper API: SRPC proxy implementation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase because two ppapi_proxy related CLs are landed Created 8 years, 11 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
Index: ppapi/native_client/src/shared/ppapi_proxy/plugin_callback.h
diff --git a/ppapi/native_client/src/shared/ppapi_proxy/plugin_callback.h b/ppapi/native_client/src/shared/ppapi_proxy/plugin_callback.h
index 658df752b4aa5e1dbcb545e19b8a60e72eaab1d6..72ba08209ea7a291d891b77399a63c5798002a25 100644
--- a/ppapi/native_client/src/shared/ppapi_proxy/plugin_callback.h
+++ b/ppapi/native_client/src/shared/ppapi_proxy/plugin_callback.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -9,6 +9,7 @@
#include <map>
#include "native_client/src/shared/ppapi_proxy/plugin_globals.h"
#include "ppapi/c/pp_completion_callback.h"
+#include "ppapi/c/pp_var.h"
namespace ppapi_proxy {
@@ -32,19 +33,26 @@ class CompletionCallbackTable {
// If |callback| is NULL, then returns 0.
int32_t AddCallback(const PP_CompletionCallback& callback);
int32_t AddCallback(const PP_CompletionCallback& callback, void* read_buffer);
+ int32_t AddCallback(const PP_CompletionCallback& callback, PP_Var* read_var);
// Removes and returns the callback and optionally the associated
// |read_buffer| corresponding to the given |callback_id|.
// If no callback is found, returns a NULL callback.
- PP_CompletionCallback RemoveCallback(int32_t callback_id, void** read_buffer);
+ PP_CompletionCallback RemoveCallback(
+ int32_t callback_id, void** read_buffer, PP_Var** read_var);
private:
// Currently implemented as singleton, so use a private constructor.
CompletionCallbackTable() : next_id_(1) { }
~CompletionCallbackTable() { }
+ int32_t AddCallback(const PP_CompletionCallback& callback,
+ void* read_buffer,
+ PP_Var* read_var);
+
struct CallbackInfo {
PP_CompletionCallback callback;
void* read_buffer; // To be used with callbacks invoked on byte reads.
+ PP_Var* read_var; // To be used with callbacks invoked on PP_Var reads.
};
typedef std::map<int32_t, CallbackInfo> CallbackTable;
« no previous file with comments | « ppapi/native_client/src/shared/ppapi_proxy/nacl.scons ('k') | ppapi/native_client/src/shared/ppapi_proxy/plugin_callback.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698