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

Unified Diff: ppapi/c/private/ppb_nacl_private.h

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 | « content/public/common/sandbox_init.h ('k') | ppapi/native_client/src/trusted/plugin/module_ppapi.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/c/private/ppb_nacl_private.h
diff --git a/ppapi/c/private/ppb_nacl_private.h b/ppapi/c/private/ppb_nacl_private.h
index e275a909bdb3ac6bdaaae63ca805bd63bf505a58..939f37f4d45ac16e0ef31094214b0e319c3f4599 100644
--- a/ppapi/c/private/ppb_nacl_private.h
+++ b/ppapi/c/private/ppb_nacl_private.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -8,7 +8,7 @@
#include "ppapi/c/pp_resource.h"
#include "ppapi/c/pp_stdint.h"
-#define PPB_NACL_PRIVATE_INTERFACE "PPB_NaCl(Private);0.2"
+#define PPB_NACL_PRIVATE_INTERFACE "PPB_NaCl(Private);0.3"
struct PPB_NaCl_Private {
// This function launches NaCl's sel_ldr process. On success, the function
@@ -33,6 +33,22 @@ struct PPB_NaCl_Private {
// Enables the creation of sel_ldr processes from other than the main thread.
void (*EnableBackgroundSelLdrLaunch)();
+
+ // This is Windows-specific. This is a replacement for
+ // DuplicateHandle() for use inside the Windows sandbox. Note that
+ // we provide this via dependency injection only to avoid the
+ // linkage problems that occur because the NaCl plugin is built as a
+ // separate DLL/DSO (see
+ // http://code.google.com/p/chromium/issues/detail?id=114439#c8).
+ // We use void* rather than the Windows HANDLE type to avoid an
+ // #ifdef here. We use int rather than PP_Bool/bool so that this is
+ // usable with NaClSetBrokerDuplicateHandleFunc() without further
+ // wrapping.
+ int (*BrokerDuplicateHandle)(void* source_handle,
+ uint32_t process_id,
+ void** target_handle,
+ uint32_t desired_access,
+ uint32_t options);
};
#endif // PPAPI_C_PRIVATE_PPB_NACL_PRIVATE_H_
« no previous file with comments | « content/public/common/sandbox_init.h ('k') | ppapi/native_client/src/trusted/plugin/module_ppapi.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698