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

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: Tweak types 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
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..ee30fce0cdacf7eb62a71d88ba54c97b551171d0 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/common/sandbox_policy.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 sandbox::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 {

Powered by Google App Engine
This is Rietveld 408576698