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

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

Issue 6177007: ppapi_proxy: Support loading and reading urls. Proxy URLLoader.... (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client/
Patch Set: '' Created 9 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
« no previous file with comments | « src/shared/ppapi_proxy/nacl.scons ('k') | src/shared/ppapi_proxy/plugin_callback.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/shared/ppapi_proxy/plugin_callback.h
===================================================================
--- src/shared/ppapi_proxy/plugin_callback.h (revision 4123)
+++ src/shared/ppapi_proxy/plugin_callback.h (working copy)
@@ -23,15 +23,23 @@
return &table;
}
- // Adds the given |callback|, generating and returning an identifier for it.
+ // Adds the given |callback| and optionally the associated |read_buffer|,
+ // generating and returning an identifier for it.
// If |callback| is NULL, then returns 0.
int32_t AddCallback(const PP_CompletionCallback& callback);
- // Removes and returns the callback corresponding to the given |callback_id|.
+ int32_t AddCallback(const PP_CompletionCallback& callback, char* read_buffer);
+ // 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);
+ PP_CompletionCallback RemoveCallback(int32_t callback_id, char** read_buffer);
private:
- typedef std::map<int32_t, PP_CompletionCallback> CallbackTable;
+ struct CallbackInfo {
+ PP_CompletionCallback callback;
+ char* read_buffer; // To be used with callbacks invoked on byte reads.
+ };
+
+ typedef std::map<int32_t, CallbackInfo> CallbackTable;
CallbackTable table_;
int32_t next_id_;
};
« no previous file with comments | « src/shared/ppapi_proxy/nacl.scons ('k') | src/shared/ppapi_proxy/plugin_callback.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698