| 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 "ppapi/proxy/dispatcher.h" | 5 #include "ppapi/proxy/dispatcher.h" |
| 6 | 6 |
| 7 #include <string.h> // For memset. | 7 #include <string.h> // For memset. |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 | 10 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 #include "ppapi/proxy/ppapi_messages.h" | 43 #include "ppapi/proxy/ppapi_messages.h" |
| 44 #include "ppapi/proxy/ppb_audio_config_proxy.h" | 44 #include "ppapi/proxy/ppb_audio_config_proxy.h" |
| 45 #include "ppapi/proxy/ppb_audio_proxy.h" | 45 #include "ppapi/proxy/ppb_audio_proxy.h" |
| 46 #include "ppapi/proxy/ppb_buffer_proxy.h" | 46 #include "ppapi/proxy/ppb_buffer_proxy.h" |
| 47 #include "ppapi/proxy/ppb_char_set_proxy.h" | 47 #include "ppapi/proxy/ppb_char_set_proxy.h" |
| 48 #include "ppapi/proxy/ppb_context_3d_proxy.h" | 48 #include "ppapi/proxy/ppb_context_3d_proxy.h" |
| 49 #include "ppapi/proxy/ppb_core_proxy.h" | 49 #include "ppapi/proxy/ppb_core_proxy.h" |
| 50 #include "ppapi/proxy/ppb_cursor_control_proxy.h" | 50 #include "ppapi/proxy/ppb_cursor_control_proxy.h" |
| 51 #include "ppapi/proxy/ppb_file_chooser_proxy.h" | 51 #include "ppapi/proxy/ppb_file_chooser_proxy.h" |
| 52 #include "ppapi/proxy/ppb_file_ref_proxy.h" | 52 #include "ppapi/proxy/ppb_file_ref_proxy.h" |
| 53 #include "ppapi/proxy/ppb_file_system_proxy.h" |
| 53 #include "ppapi/proxy/ppb_flash_proxy.h" | 54 #include "ppapi/proxy/ppb_flash_proxy.h" |
| 54 #include "ppapi/proxy/ppb_flash_menu_proxy.h" | 55 #include "ppapi/proxy/ppb_flash_menu_proxy.h" |
| 55 #include "ppapi/proxy/ppb_font_proxy.h" | 56 #include "ppapi/proxy/ppb_font_proxy.h" |
| 56 #include "ppapi/proxy/ppb_fullscreen_proxy.h" | 57 #include "ppapi/proxy/ppb_fullscreen_proxy.h" |
| 57 #include "ppapi/proxy/ppb_gles_chromium_texture_mapping_proxy.h" | 58 #include "ppapi/proxy/ppb_gles_chromium_texture_mapping_proxy.h" |
| 58 #include "ppapi/proxy/ppb_graphics_2d_proxy.h" | 59 #include "ppapi/proxy/ppb_graphics_2d_proxy.h" |
| 59 #include "ppapi/proxy/ppb_image_data_proxy.h" | 60 #include "ppapi/proxy/ppb_image_data_proxy.h" |
| 60 #include "ppapi/proxy/ppb_instance_proxy.h" | 61 #include "ppapi/proxy/ppb_instance_proxy.h" |
| 61 #include "ppapi/proxy/ppb_opengles2_proxy.h" | 62 #include "ppapi/proxy/ppb_opengles2_proxy.h" |
| 62 #include "ppapi/proxy/ppb_pdf_proxy.h" | 63 #include "ppapi/proxy/ppb_pdf_proxy.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 85 | 86 |
| 86 typedef std::map<std::string, const InterfaceProxy::Info*> NameToInfo; | 87 typedef std::map<std::string, const InterfaceProxy::Info*> NameToInfo; |
| 87 NameToInfo name_to_plugin_info_; | 88 NameToInfo name_to_plugin_info_; |
| 88 NameToInfo name_to_browser_info_; | 89 NameToInfo name_to_browser_info_; |
| 89 | 90 |
| 90 const InterfaceProxy::Info* id_to_plugin_info_[INTERFACE_ID_COUNT]; | 91 const InterfaceProxy::Info* id_to_plugin_info_[INTERFACE_ID_COUNT]; |
| 91 const InterfaceProxy::Info* id_to_browser_info_[INTERFACE_ID_COUNT]; | 92 const InterfaceProxy::Info* id_to_browser_info_[INTERFACE_ID_COUNT]; |
| 92 }; | 93 }; |
| 93 | 94 |
| 94 InterfaceList::InterfaceList() { | 95 InterfaceList::InterfaceList() { |
| 95 memset(id_to_plugin_info_, 0, | 96 memset(id_to_plugin_info_, 0, sizeof(id_to_plugin_info_)); |
| 96 static_cast<int>(INTERFACE_ID_COUNT) * sizeof(InterfaceID)); | 97 memset(id_to_browser_info_, 0, sizeof(id_to_browser_info_)); |
| 97 memset(id_to_browser_info_, 0, | |
| 98 static_cast<int>(INTERFACE_ID_COUNT) * sizeof(InterfaceID)); | |
| 99 | 98 |
| 100 // PPB (browser) interfaces. | 99 // PPB (browser) interfaces. |
| 101 AddPPB(PPB_AudioConfig_Proxy::GetInfo()); | 100 AddPPB(PPB_AudioConfig_Proxy::GetInfo()); |
| 102 AddPPB(PPB_Audio_Proxy::GetInfo()); | 101 AddPPB(PPB_Audio_Proxy::GetInfo()); |
| 103 AddPPB(PPB_Buffer_Proxy::GetInfo()); | 102 AddPPB(PPB_Buffer_Proxy::GetInfo()); |
| 104 AddPPB(PPB_CharSet_Proxy::GetInfo()); | 103 AddPPB(PPB_CharSet_Proxy::GetInfo()); |
| 105 AddPPB(PPB_Context3D_Proxy::GetInfo()); | 104 AddPPB(PPB_Context3D_Proxy::GetInfo()); |
| 106 AddPPB(PPB_Core_Proxy::GetInfo()); | 105 AddPPB(PPB_Core_Proxy::GetInfo()); |
| 107 AddPPB(PPB_CursorControl_Proxy::GetInfo()); | 106 AddPPB(PPB_CursorControl_Proxy::GetInfo()); |
| 108 AddPPB(PPB_FileChooser_Proxy::GetInfo()); | 107 AddPPB(PPB_FileChooser_Proxy::GetInfo()); |
| 109 AddPPB(PPB_FileRef_Proxy::GetInfo()); | 108 AddPPB(PPB_FileRef_Proxy::GetInfo()); |
| 109 AddPPB(PPB_FileSystem_Proxy::GetInfo()); |
| 110 AddPPB(PPB_Flash_Proxy::GetInfo()); | 110 AddPPB(PPB_Flash_Proxy::GetInfo()); |
| 111 AddPPB(PPB_Flash_Menu_Proxy::GetInfo()); | 111 AddPPB(PPB_Flash_Menu_Proxy::GetInfo()); |
| 112 AddPPB(PPB_Font_Proxy::GetInfo()); | 112 AddPPB(PPB_Font_Proxy::GetInfo()); |
| 113 AddPPB(PPB_Fullscreen_Proxy::GetInfo()); | 113 AddPPB(PPB_Fullscreen_Proxy::GetInfo()); |
| 114 AddPPB(PPB_GLESChromiumTextureMapping_Proxy::GetInfo()); | 114 AddPPB(PPB_GLESChromiumTextureMapping_Proxy::GetInfo()); |
| 115 AddPPB(PPB_Graphics2D_Proxy::GetInfo()); | 115 AddPPB(PPB_Graphics2D_Proxy::GetInfo()); |
| 116 AddPPB(PPB_ImageData_Proxy::GetInfo()); | 116 AddPPB(PPB_ImageData_Proxy::GetInfo()); |
| 117 AddPPB(PPB_Instance_Proxy::GetInfo()); | 117 AddPPB(PPB_Instance_Proxy::GetInfo()); |
| 118 AddPPB(PPB_OpenGLES2_Proxy::GetInfo()); | 118 AddPPB(PPB_OpenGLES2_Proxy::GetInfo()); |
| 119 AddPPB(PPB_PDF_Proxy::GetInfo()); | 119 AddPPB(PPB_PDF_Proxy::GetInfo()); |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 return channel_->Send(msg); | 256 return channel_->Send(msg); |
| 257 | 257 |
| 258 // Remote side crashed, drop this message. | 258 // Remote side crashed, drop this message. |
| 259 delete msg; | 259 delete msg; |
| 260 return false; | 260 return false; |
| 261 } | 261 } |
| 262 | 262 |
| 263 } // namespace proxy | 263 } // namespace proxy |
| 264 } // namespace pp | 264 } // namespace pp |
| 265 | 265 |
| OLD | NEW |