On Mon, Feb 9, 2015 at 1:38 PM, Mark Seaborn <
msea...@chromium.org> wrote:
> I think a good next step would be to move ppb_nacl_private.h out of
> ppapi/c/private/ and into components/nacl/renderer/, and drop the .idl file
> that it is generated from. I've started preparing a change for that
> (
https://codereview.chromium.org/911463003/).
>
> Since PPB_NaCl_Private is both implemented and consumed in
> components/nacl/renderer/, there's no need for the interface to be defined
> in ppapi/. The fact that this is a PPAPI interface at all is just a
> holdover from when the code for the NaCl trusted plugin lived outside the
> Chromium repo.
>
> This move would have a few benefits:
>
> * It reduces the friction for changing ppb_nacl_private.h, because it would
> no longer be necessary to change ppb_nacl_private.idl and re-run the
> generator.
> * It removes PPB_NaCl_Private from the PPAPI shims, saving some code size
> (fixing
https://crbug.com/251460).
> * It means ppb_nacl_private.h no longer has to follow the PPAPI C header
> style. For example, it would no longer need to define its own "struct
> PP_NaClFileInfo" type -- it could share a definition that's marshallable
> over Chrome IPC. (That would make changes like Yusuke's open_resource()
> change cleaner --
https://codereview.chromium.org/649603004/.)
>
> Does that sound OK?
Sounds OK to me, as long as there's a comment in ppb_nacl_private.h
(or whatever its renamed to) with a note about what headers can be
included from there. I know that anything that includes base/logging.h
is problematic, because it causes collisions on some logging macros.
>
> After that, a further cleanup would be to remove the PPB_NaCl_Private struct
> and change the trusted plugin code to directly call the functions in
> ppb_nacl_private_impl.cc, or have this file define a C++ object. But that
> refactoring would be more of a manual change. We should probably rename
> "ppb_nacl_private" to something else, too -- any suggestions?
My only thought is TrustedPluginSupport; though I don't like the term
"trusted plugin" very much.
> --
> You received this message because you are subscribed to the Google Groups
> "Native-Client-Dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
native-client-...@googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.