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

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

Issue 11366038: Rewrite PPB_AudioInput_Dev to use the new-style host/resource. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 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/content_renderer.gypi ('k') | content/renderer/pepper/content_renderer_pepper_host_factory.cc » ('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 e223094839e2c934c401ee764e50fd9738a207ea..8f8dfb3690d456a7815394c23ac3393f36008546 100644
--- a/content/public/renderer/renderer_ppapi_host.h
+++ b/content/public/renderer/renderer_ppapi_host.h
@@ -6,7 +6,9 @@
#define CONTENT_PUBLIC_RENDERER_RENDERER_PPAPI_HOST_H_
#include "base/memory/ref_counted.h"
+#include "base/platform_file.h"
#include "content/common/content_export.h"
+#include "ipc/ipc_platform_file.h"
#include "ppapi/c/pp_instance.h"
class FilePath;
@@ -22,6 +24,12 @@ class PpapiHost;
}
}
+namespace webkit {
+namespace ppapi {
+class PluginInstance;
+}
+}
+
namespace WebKit {
class WebPluginContainer;
}
@@ -63,6 +71,11 @@ class RendererPpapiHost {
// plugin associated with this host.
virtual bool IsValidInstance(PP_Instance instance) const = 0;
+ // Returns the PluginInstance for the given PP_Instance, or NULL if the
+ // PP_Instance is invalid.
+ virtual webkit::ppapi::PluginInstance* GetPluginInstance(
+ PP_Instance instance) const = 0;
+
// Returns the RenderView for the given plugin instance, or NULL if the
// instance is invalid.
virtual RenderView* GetRenderViewForInstance(PP_Instance instance) const = 0;
@@ -79,6 +92,16 @@ class RendererPpapiHost {
// if there is no current user gesture.
virtual bool HasUserGesture(PP_Instance instance) const = 0;
+ // Shares a file handle (HANDLE / file descriptor) with the remote side. It
+ // returns a handle that should be sent in exactly one IPC message. Upon
+ // receipt, the remote side then owns that handle. Note: if sending the
+ // message fails, the returned handle is properly closed by the IPC system. If
+ // |should_close_source| is set to true, the original handle is closed by this
+ // operation and should not be used again.
+ virtual IPC::PlatformFileForTransit ShareHandleWithRemote(
+ base::PlatformFile handle,
+ bool should_close_source) = 0;
+
protected:
virtual ~RendererPpapiHost() {}
};
« no previous file with comments | « content/content_renderer.gypi ('k') | content/renderer/pepper/content_renderer_pepper_host_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698