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

Unified Diff: content/public/renderer/renderer_ppapi_host.h

Issue 605593002: PPAPI: Support sending browser-hosted resources synchronously Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix content_browsertests Created 6 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 | « content/browser/renderer_host/render_message_filter.cc ('k') | content/renderer/pepper/message_channel.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/renderer/renderer_ppapi_host.h
diff --git a/content/public/renderer/renderer_ppapi_host.h b/content/public/renderer/renderer_ppapi_host.h
index e13c31371ca490dff39d849306249038d19e19ec..e596b862b4f278ba2559ee081cf0c86b227cbd73 100644
--- a/content/public/renderer/renderer_ppapi_host.h
+++ b/content/public/renderer/renderer_ppapi_host.h
@@ -14,6 +14,7 @@
#include "content/common/content_export.h"
#include "ipc/ipc_platform_file.h"
#include "ppapi/c/pp_instance.h"
+#include "ppapi/proxy/serialized_structs.h" // FIXME... problem?
#include "url/gurl.h"
namespace base {
@@ -49,6 +50,10 @@ class RenderView;
// There will be one of these objects in the renderer per plugin module.
class RendererPpapiHost {
public:
+ typedef
+ base::Callback<void(const ppapi::proxy::CompletedBrowserResourceHosts&)>
+ PendingResourceCallback;
+
// Returns the RendererPpapiHost associated with the given PP_Instance,
// or NULL if the instance is invalid.
//
@@ -147,10 +152,13 @@ class RendererPpapiHost {
// the pending host IDs when the ResourceHosts have been created. This can be
// passed back to the plugin to attach to the ResourceHosts. Pending IDs of 0
// will be passed to the callback if a ResourceHost fails to be created.
- virtual void CreateBrowserResourceHosts(
+ //
+ // Returns a sequence number which can be used to associate responses with
+ // requests.
+ virtual int32_t CreateBrowserResourceHosts(
PP_Instance instance,
const std::vector<IPC::Message>& nested_msgs,
- const base::Callback<void(const std::vector<int>&)>& callback) const = 0;
+ const PendingResourceCallback& callback) const = 0;
// Gets the URL of the document containing the given PP_Instance.
// Returns an empty URL if the instance is invalid.
« no previous file with comments | « content/browser/renderer_host/render_message_filter.cc ('k') | content/renderer/pepper/message_channel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698