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

Unified Diff: ppapi/shared_impl/resource.h

Issue 10572040: Create a PPAPI host for new resource message routing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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/proxy/dispatcher.cc ('k') | ppapi/shared_impl/resource.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/shared_impl/resource.h
diff --git a/ppapi/shared_impl/resource.h b/ppapi/shared_impl/resource.h
index a68575433a04481eb1c4ba6b086154d6549f52e4..efe40daff329108adf70e824ed6b736dcfa1ea3c 100644
--- a/ppapi/shared_impl/resource.h
+++ b/ppapi/shared_impl/resource.h
@@ -65,6 +65,10 @@
F(PPB_Widget_API) \
F(PPB_X509Certificate_Private_API)
+namespace IPC {
+class Message;
+}
+
namespace ppapi {
// Forward declare all the resource APIs.
@@ -161,6 +165,22 @@ class PPAPI_SHARED_EXPORT Resource : public base::RefCounted<Resource> {
// Template-based dynamic casting. See specializations below.
template <typename T> T* GetAs() { return NULL; }
+ // Called when a PpapiPluginMsg_ResourceReply reply is received for a
+ // previous CallRenderer. The sequence number is the value returned the
+ // send function for the given request. The message is the nested reply
+ // message, which may be an empty message (depending on what the host
+ // sends).
+ //
+ // The default implementation will assert (if you send a request, you should
+ // override this function).
+ //
+ // (This function would make more conceptual sense on PluginResource but we
+ // need to call this function from general code that doesn't know how to
+ // distinguish the classes.)
+ virtual void OnReplyReceived(int sequence,
+ int32_t result,
+ const IPC::Message& msg);
+
protected:
// Logs a message to the console from this resource.
void Log(PP_LogLevel_Dev level, const std::string& message);
« no previous file with comments | « ppapi/proxy/dispatcher.cc ('k') | ppapi/shared_impl/resource.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698