| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "app/surface/transport_dib.h" | |
| 6 #include "base/shared_memory.h" | 5 #include "base/shared_memory.h" |
| 7 #include "base/sync_socket.h" | 6 #include "base/sync_socket.h" |
| 8 #include "native_client/src/trusted/desc/nacl_desc_base.h" | 7 #include "native_client/src/trusted/desc/nacl_desc_base.h" |
| 9 #include "native_client/src/trusted/desc/nacl_desc_sync_socket.h" | 8 #include "native_client/src/trusted/desc/nacl_desc_sync_socket.h" |
| 10 #include "native_client/src/trusted/desc/nacl_desc_wrapper.h" | 9 #include "native_client/src/trusted/desc/nacl_desc_wrapper.h" |
| 10 #include "ui/gfx/surface/transport_dib.h" |
| 11 | 11 |
| 12 namespace nacl { | 12 namespace nacl { |
| 13 | 13 |
| 14 DescWrapper* DescWrapperFactory::ImportPepperSharedMemory(intptr_t shm_int, | 14 DescWrapper* DescWrapperFactory::ImportPepperSharedMemory(intptr_t shm_int, |
| 15 size_t size) { | 15 size_t size) { |
| 16 base::SharedMemory* shm = reinterpret_cast<base::SharedMemory*>(shm_int); | 16 base::SharedMemory* shm = reinterpret_cast<base::SharedMemory*>(shm_int); |
| 17 #if defined(OS_LINUX) || defined(OS_MACOSX) | 17 #if defined(OS_LINUX) || defined(OS_MACOSX) |
| 18 return ImportShmHandle(shm->handle().fd, size); | 18 return ImportShmHandle(shm->handle().fd, size); |
| 19 #elif defined(OS_WIN) | 19 #elif defined(OS_WIN) |
| 20 return ImportShmHandle(shm->handle(), size); | 20 return ImportShmHandle(shm->handle(), size); |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 } | 62 } |
| 63 ss_desc = NULL; // DescWrapper takes ownership of ss_desc. | 63 ss_desc = NULL; // DescWrapper takes ownership of ss_desc. |
| 64 return wrapper; | 64 return wrapper; |
| 65 | 65 |
| 66 cleanup: | 66 cleanup: |
| 67 NaClDescSafeUnref(&ss_desc->base); | 67 NaClDescSafeUnref(&ss_desc->base); |
| 68 return NULL; | 68 return NULL; |
| 69 } | 69 } |
| 70 | 70 |
| 71 } // namespace nacl | 71 } // namespace nacl |
| OLD | NEW |