| OLD | NEW |
| 1 // Copyright (c) 2011 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 "native_client/src/shared/ppapi_proxy/browser_ppp.h" | 5 #include "native_client/src/shared/ppapi_proxy/browser_ppp.h" |
| 6 | 6 |
| 7 #include <string.h> | 7 #include <string.h> |
| 8 | 8 |
| 9 #include "native_client/src/include/nacl_scoped_ptr.h" | 9 #include "native_client/src/include/nacl_scoped_ptr.h" |
| 10 #include "native_client/src/include/portability.h" | 10 #include "native_client/src/include/portability.h" |
| 11 #include "native_client/src/include/portability_process.h" | 11 #include "native_client/src/include/portability_process.h" |
| 12 #include "native_client/src/shared/ppapi_proxy/browser_globals.h" | 12 #include "native_client/src/shared/ppapi_proxy/browser_globals.h" |
| 13 #include "native_client/src/shared/ppapi_proxy/browser_ppp_find.h" | 13 #include "native_client/src/shared/ppapi_proxy/browser_ppp_find.h" |
| 14 #include "native_client/src/shared/ppapi_proxy/browser_ppp_input_event.h" | 14 #include "native_client/src/shared/ppapi_proxy/browser_ppp_input_event.h" |
| 15 #include "native_client/src/shared/ppapi_proxy/browser_ppp_instance.h" | 15 #include "native_client/src/shared/ppapi_proxy/browser_ppp_instance.h" |
| 16 #include "native_client/src/shared/ppapi_proxy/browser_ppp_mouse_lock.h" | 16 #include "native_client/src/shared/ppapi_proxy/browser_ppp_mouse_lock.h" |
| 17 #include "native_client/src/shared/ppapi_proxy/browser_ppp_messaging.h" | 17 #include "native_client/src/shared/ppapi_proxy/browser_ppp_messaging.h" |
| 18 #include "native_client/src/shared/ppapi_proxy/browser_ppp_printing.h" | 18 #include "native_client/src/shared/ppapi_proxy/browser_ppp_printing.h" |
| 19 #include "native_client/src/shared/ppapi_proxy/browser_ppp_scrollbar.h" | 19 #include "native_client/src/shared/ppapi_proxy/browser_ppp_scrollbar.h" |
| 20 #include "native_client/src/shared/ppapi_proxy/browser_ppp_selection.h" | 20 #include "native_client/src/shared/ppapi_proxy/browser_ppp_selection.h" |
| 21 #include "native_client/src/shared/ppapi_proxy/browser_ppp_widget.h" | 21 #include "native_client/src/shared/ppapi_proxy/browser_ppp_widget.h" |
| 22 #include "native_client/src/shared/ppapi_proxy/browser_ppp_zoom.h" | 22 #include "native_client/src/shared/ppapi_proxy/browser_ppp_zoom.h" |
| 23 #include "native_client/src/shared/ppapi_proxy/browser_upcall.h" | 23 #include "native_client/src/shared/ppapi_proxy/browser_upcall.h" |
| 24 #include "native_client/src/shared/ppapi_proxy/trusted/srpcgen/ppb_rpc.h" | 24 #include "native_client/src/shared/ppapi_proxy/trusted/srpcgen/ppb_rpc.h" |
| 25 #include "native_client/src/shared/ppapi_proxy/trusted/srpcgen/ppp_rpc.h" | 25 #include "native_client/src/shared/ppapi_proxy/trusted/srpcgen/ppp_rpc.h" |
| 26 #include "native_client/src/shared/ppapi_proxy/utility.h" | 26 #include "native_client/src/shared/ppapi_proxy/utility.h" |
| 27 #include "native_client/src/trusted/desc/nacl_desc_wrapper.h" | 27 #include "native_client/src/trusted/desc/nacl_desc_wrapper.h" |
| 28 #include "native_client/src/trusted/plugin/plugin.h" | 28 #include "native_client/src/trusted/plugin/plugin.h" |
| 29 #include "ppapi/c/dev/ppp_find_dev.h" | 29 #include "ppapi/c/dev/ppp_find_dev.h" |
| 30 #include "ppapi/c/dev/ppp_mouse_lock_dev.h" | |
| 31 #include "ppapi/c/dev/ppp_printing_dev.h" | 30 #include "ppapi/c/dev/ppp_printing_dev.h" |
| 32 #include "ppapi/c/dev/ppp_scrollbar_dev.h" | 31 #include "ppapi/c/dev/ppp_scrollbar_dev.h" |
| 33 #include "ppapi/c/dev/ppp_selection_dev.h" | 32 #include "ppapi/c/dev/ppp_selection_dev.h" |
| 34 #include "ppapi/c/dev/ppp_widget_dev.h" | 33 #include "ppapi/c/dev/ppp_widget_dev.h" |
| 35 #include "ppapi/c/dev/ppp_zoom_dev.h" | 34 #include "ppapi/c/dev/ppp_zoom_dev.h" |
| 36 #include "ppapi/c/pp_errors.h" | 35 #include "ppapi/c/pp_errors.h" |
| 37 #include "ppapi/c/ppp.h" | 36 #include "ppapi/c/ppp.h" |
| 38 #include "ppapi/c/ppp_input_event.h" | 37 #include "ppapi/c/ppp_input_event.h" |
| 38 #include "ppapi/c/ppp_mouse_lock.h" |
| 39 #include "ppapi/c/private/ppb_nacl_private.h" | 39 #include "ppapi/c/private/ppb_nacl_private.h" |
| 40 | 40 |
| 41 namespace ppapi_proxy { | 41 namespace ppapi_proxy { |
| 42 | 42 |
| 43 // | 43 // |
| 44 // The following methods are the SRPC dispatchers for ppapi/c/ppp.h. | 44 // The following methods are the SRPC dispatchers for ppapi/c/ppp.h. |
| 45 // | 45 // |
| 46 | 46 |
| 47 namespace { | 47 namespace { |
| 48 | 48 |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 | 166 |
| 167 const void* ppp_interface = NULL; | 167 const void* ppp_interface = NULL; |
| 168 if (srpc_result != NACL_SRPC_RESULT_OK || !exports_interface_name) { | 168 if (srpc_result != NACL_SRPC_RESULT_OK || !exports_interface_name) { |
| 169 ppp_interface = NULL; | 169 ppp_interface = NULL; |
| 170 } else if (strcmp(interface_name, PPP_INSTANCE_INTERFACE) == 0) { | 170 } else if (strcmp(interface_name, PPP_INSTANCE_INTERFACE) == 0) { |
| 171 ppp_interface = | 171 ppp_interface = |
| 172 reinterpret_cast<const void*>(BrowserInstance::GetInterface()); | 172 reinterpret_cast<const void*>(BrowserInstance::GetInterface()); |
| 173 } else if (strcmp(interface_name, PPP_MESSAGING_INTERFACE) == 0) { | 173 } else if (strcmp(interface_name, PPP_MESSAGING_INTERFACE) == 0) { |
| 174 ppp_interface = | 174 ppp_interface = |
| 175 reinterpret_cast<const void*>(BrowserMessaging::GetInterface()); | 175 reinterpret_cast<const void*>(BrowserMessaging::GetInterface()); |
| 176 } else if (strcmp(interface_name, PPP_MOUSELOCK_DEV_INTERFACE) == 0) { | 176 } else if (strcmp(interface_name, PPP_MOUSELOCK_INTERFACE) == 0) { |
| 177 ppp_interface = | 177 ppp_interface = |
| 178 reinterpret_cast<const void*>(BrowserMouseLock::GetInterface()); | 178 reinterpret_cast<const void*>(BrowserMouseLock::GetInterface()); |
| 179 } else if (strcmp(interface_name, PPP_INPUT_EVENT_INTERFACE) == 0) { | 179 } else if (strcmp(interface_name, PPP_INPUT_EVENT_INTERFACE) == 0) { |
| 180 ppp_interface = | 180 ppp_interface = |
| 181 reinterpret_cast<const void*>(BrowserInputEvent::GetInterface()); | 181 reinterpret_cast<const void*>(BrowserInputEvent::GetInterface()); |
| 182 } else if (strcmp(interface_name, PPP_FIND_DEV_INTERFACE) == 0) { | 182 } else if (strcmp(interface_name, PPP_FIND_DEV_INTERFACE) == 0) { |
| 183 ppp_interface = | 183 ppp_interface = |
| 184 reinterpret_cast<const void*>(BrowserFind::GetInterface()); | 184 reinterpret_cast<const void*>(BrowserFind::GetInterface()); |
| 185 } else if (strcmp(interface_name, PPP_PRINTING_DEV_INTERFACE) == 0) { | 185 } else if (strcmp(interface_name, PPP_PRINTING_DEV_INTERFACE) == 0) { |
| 186 ppp_interface = | 186 ppp_interface = |
| (...skipping 18 matching lines...) Expand all Loading... |
| 205 | 205 |
| 206 const void* BrowserPpp::GetPluginInterfaceSafe(const char* interface_name) { | 206 const void* BrowserPpp::GetPluginInterfaceSafe(const char* interface_name) { |
| 207 const void* ppp_interface = GetPluginInterface(interface_name); | 207 const void* ppp_interface = GetPluginInterface(interface_name); |
| 208 if (ppp_interface == NULL) | 208 if (ppp_interface == NULL) |
| 209 DebugPrintf("PPB_GetInterface: %s not found\n", interface_name); | 209 DebugPrintf("PPB_GetInterface: %s not found\n", interface_name); |
| 210 CHECK(ppp_interface != NULL); | 210 CHECK(ppp_interface != NULL); |
| 211 return ppp_interface; | 211 return ppp_interface; |
| 212 } | 212 } |
| 213 | 213 |
| 214 } // namespace ppapi_proxy | 214 } // namespace ppapi_proxy |
| OLD | NEW |