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

Unified Diff: chrome/renderer/chrome_ppapi_interfaces.cc

Issue 10039001: NaCl: Supply Windows handle-passing function (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix + comment Created 8 years, 8 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 | « chrome/nacl/nacl_listener.cc ('k') | content/common/sandbox_policy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/chrome_ppapi_interfaces.cc
diff --git a/chrome/renderer/chrome_ppapi_interfaces.cc b/chrome/renderer/chrome_ppapi_interfaces.cc
index 321f86b6c0ae478ebe6101fc6632e91c99267fef..243039176eb524f887ffd8788aeb0e9464c85969 100644
--- a/chrome/renderer/chrome_ppapi_interfaces.cc
+++ b/chrome/renderer/chrome_ppapi_interfaces.cc
@@ -23,6 +23,10 @@
#include "ppapi/native_client/src/trusted/plugin/nacl_entry_points.h"
#endif
+#if defined(OS_WIN)
+#include "content/public/common/sandbox_init.h"
+#endif
+
using content::RenderThread;
namespace chrome {
@@ -78,11 +82,26 @@ void EnableBackgroundSelLdrLaunch() {
RenderThread::Get()->GetSyncMessageFilter();
}
+int BrokerDuplicateHandle(void* source_handle,
+ unsigned int process_id,
+ void** target_handle,
+ unsigned int desired_access,
+ unsigned int options) {
+#if defined(OS_WIN)
+ return content::BrokerDuplicateHandle(source_handle, process_id,
+ target_handle, desired_access,
+ options);
+#else
+ return 0;
+#endif
+}
+
const PPB_NaCl_Private ppb_nacl = {
&LaunchSelLdr,
&UrandomFD,
&Are3DInterfacesDisabled,
&EnableBackgroundSelLdrLaunch,
+ &BrokerDuplicateHandle,
};
class PPB_NaCl_Impl {
« no previous file with comments | « chrome/nacl/nacl_listener.cc ('k') | content/common/sandbox_policy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698