| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2008 The Native Client Authors. All rights reserved. | 2 * Copyright 2008 The Native Client Authors. All rights reserved. |
| 3 * Use of this source code is governed by a BSD-style license that can | 3 * Use of this source code is governed by a BSD-style license that can |
| 4 * be found in the LICENSE file. | 4 * be found in the LICENSE file. |
| 5 */ | 5 */ |
| 6 | 6 |
| 7 #include "native_client/src/trusted/plugin/srpc/plugin.h" | 7 #include "native_client/src/trusted/plugin/plugin.h" |
| 8 | 8 |
| 9 #include <assert.h> | 9 #include <assert.h> |
| 10 #include <fcntl.h> | 10 #include <fcntl.h> |
| 11 #include <stdarg.h> | 11 #include <stdarg.h> |
| 12 #include <stdio.h> | 12 #include <stdio.h> |
| 13 #include <stdlib.h> | 13 #include <stdlib.h> |
| 14 #include <string.h> | 14 #include <string.h> |
| 15 | 15 |
| 16 #include <sys/types.h> | 16 #include <sys/types.h> |
| 17 #include <sys/stat.h> | 17 #include <sys/stat.h> |
| 18 | 18 |
| 19 #include "native_client/src/include/nacl_string.h" | 19 #include "native_client/src/include/nacl_string.h" |
| 20 #include "native_client/src/include/portability_string.h" | 20 #include "native_client/src/include/portability_string.h" |
| 21 #include "native_client/src/trusted/desc/nacl_desc_base.h" | 21 #include "native_client/src/trusted/desc/nacl_desc_base.h" |
| 22 #include "native_client/src/trusted/desc/nacl_desc_conn_cap.h" | 22 #include "native_client/src/trusted/desc/nacl_desc_conn_cap.h" |
| 23 #include "native_client/src/trusted/desc/nacl_desc_wrapper.h" | 23 #include "native_client/src/trusted/desc/nacl_desc_wrapper.h" |
| 24 #include "native_client/src/trusted/nonnacl_util/sel_ldr_launcher.h" | 24 #include "native_client/src/trusted/nonnacl_util/sel_ldr_launcher.h" |
| 25 // TODO(sehr): move video_update_mode_ to PluginNpapi |
| 25 #include "native_client/src/trusted/plugin/npapi/video.h" | 26 #include "native_client/src/trusted/plugin/npapi/video.h" |
| 26 #include "native_client/src/trusted/plugin/origin.h" | 27 #include "native_client/src/trusted/plugin/origin.h" |
| 27 #include "native_client/src/trusted/plugin/srpc/browser_interface.h" | 28 #include "native_client/src/trusted/plugin/browser_interface.h" |
| 28 #include "native_client/src/trusted/plugin/srpc/connected_socket.h" | 29 #include "native_client/src/trusted/plugin/connected_socket.h" |
| 29 #include "native_client/src/trusted/plugin/srpc/nexe_arch.h" | 30 #include "native_client/src/trusted/plugin/nexe_arch.h" |
| 30 #include "native_client/src/trusted/plugin/srpc/scriptable_handle.h" | 31 #include "native_client/src/trusted/plugin/scriptable_handle.h" |
| 31 #include "native_client/src/trusted/plugin/srpc/service_runtime.h" | 32 #include "native_client/src/trusted/plugin/service_runtime.h" |
| 32 #include "native_client/src/trusted/plugin/srpc/shared_memory.h" | 33 #include "native_client/src/trusted/plugin/shared_memory.h" |
| 33 #include "native_client/src/trusted/plugin/srpc/socket_address.h" | 34 #include "native_client/src/trusted/plugin/socket_address.h" |
| 34 #include "native_client/src/trusted/plugin/srpc/stream_shm_buffer.h" | 35 #include "native_client/src/trusted/plugin/stream_shm_buffer.h" |
| 35 #include "native_client/src/trusted/plugin/srpc/string_encoding.h" | 36 #include "native_client/src/trusted/plugin/string_encoding.h" |
| 36 #include "native_client/src/trusted/plugin/srpc/utility.h" | 37 #include "native_client/src/trusted/plugin/utility.h" |
| 37 | 38 |
| 38 namespace { | 39 namespace { |
| 39 | 40 |
| 40 static int32_t stringToInt32(char* src) { | 41 static int32_t stringToInt32(char* src) { |
| 41 return strtol(src, // NOLINT(runtime/deprecated_fn) | 42 return strtol(src, // NOLINT(runtime/deprecated_fn) |
| 42 static_cast<char**>(NULL), 0); | 43 static_cast<char**>(NULL), 0); |
| 43 } | 44 } |
| 44 | 45 |
| 45 // TODO(sehr): using a static jmpbuf here has several problems. Notably we | 46 // TODO(sehr): using a static jmpbuf here has several problems. Notably we |
| 46 // cannot reliably handle errors when there are multiple plugins in the same | 47 // cannot reliably handle errors when there are multiple plugins in the same |
| (...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 627 | 628 |
| 628 void VideoGlobalLock() { | 629 void VideoGlobalLock() { |
| 629 g_VideoMutex.Lock(); | 630 g_VideoMutex.Lock(); |
| 630 } | 631 } |
| 631 | 632 |
| 632 void VideoGlobalUnlock() { | 633 void VideoGlobalUnlock() { |
| 633 g_VideoMutex.Unlock(); | 634 g_VideoMutex.Unlock(); |
| 634 } | 635 } |
| 635 | 636 |
| 636 } // namespace plugin | 637 } // namespace plugin |
| OLD | NEW |