PPAPI/NaCl: Make NaClIPCAdapter transfer handles more generally

This does a couple of things:
- It defines a new wrapper for passing any kind of handle through the PPAPI proxy (SerializedHandle).
- It updates nacl_ipc_adapter to have a more general way to pick apart messages based on their static types (which include the types of all the params).
- It adds support for PPB_Graphics2D and PPB_Graphics3D to the NaCl IPC proxy (e.g., NaCl SDK examples pi_generator and tumbler work in the new proxy with this patch).

The downside is it requires pulling parts of ppapi/shared_impl and ppapi/proxy in to the NaCl Win64 build. 

BUG=116317
TEST=


Review URL: https://chromiumcodereview.appspot.com/10828023

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@153531 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/ppapi/proxy/ppb_graphics_3d_proxy.cc b/ppapi/proxy/ppb_graphics_3d_proxy.cc
index 25bcd44f..a5612c4 100644
--- a/ppapi/proxy/ppb_graphics_3d_proxy.cc
+++ b/ppapi/proxy/ppb_graphics_3d_proxy.cc
@@ -316,18 +316,17 @@
 void PPB_Graphics3D_Proxy::OnMsgGetTransferBuffer(
     const HostResource& context,
     int32 id,
-    base::SharedMemoryHandle* transfer_buffer,
-    uint32* size) {
-  *transfer_buffer = base::SharedMemory::NULLHandle();
-  *size = 0;
+    ppapi::proxy::SerializedHandle* transfer_buffer) {
+  transfer_buffer->set_null_shmem();
 
   EnterHostFromHostResource<PPB_Graphics3D_API> enter(context);
   int shm_handle = 0;
   uint32_t shm_size = 0;
   if (enter.succeeded() &&
       enter.object()->GetTransferBuffer(id, &shm_handle, &shm_size)) {
-    *transfer_buffer = TransportSHMHandleFromInt(dispatcher(), shm_handle);
-    *size = shm_size;
+    transfer_buffer->set_shmem(
+        TransportSHMHandleFromInt(dispatcher(), shm_handle),
+        shm_size);
   }
 }