| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "webkit/plugins/ppapi/ppb_tcp_socket_private_impl.h" | 5 #include "webkit/plugins/ppapi/ppb_tcp_socket_private_impl.h" |
| 6 | 6 |
| 7 #include "webkit/plugins/ppapi/host_globals.h" | 7 #include "webkit/plugins/ppapi/host_globals.h" |
| 8 #include "webkit/plugins/ppapi/plugin_delegate.h" | 8 #include "webkit/plugins/ppapi/plugin_delegate.h" |
| 9 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" | 9 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" |
| 10 #include "webkit/plugins/ppapi/resource_helper.h" | 10 #include "webkit/plugins/ppapi/resource_helper.h" |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 const PP_NetAddress_Private& addr) { | 67 const PP_NetAddress_Private& addr) { |
| 68 PluginDelegate* plugin_delegate = ResourceHelper::GetPluginDelegate(this); | 68 PluginDelegate* plugin_delegate = ResourceHelper::GetPluginDelegate(this); |
| 69 if (!plugin_delegate) | 69 if (!plugin_delegate) |
| 70 return; | 70 return; |
| 71 | 71 |
| 72 plugin_delegate->TCPSocketConnectWithNetAddress(this, socket_id_, addr); | 72 plugin_delegate->TCPSocketConnectWithNetAddress(this, socket_id_, addr); |
| 73 } | 73 } |
| 74 | 74 |
| 75 void PPB_TCPSocket_Private_Impl::SendSSLHandshake( | 75 void PPB_TCPSocket_Private_Impl::SendSSLHandshake( |
| 76 const std::string& server_name, | 76 const std::string& server_name, |
| 77 uint16_t server_port) { | 77 uint16_t server_port, |
| 78 const std::vector<std::vector<char> >& trusted_certs, |
| 79 const std::vector<std::vector<char> >& untrusted_certs) { |
| 78 PluginDelegate* plugin_delegate = ResourceHelper::GetPluginDelegate(this); | 80 PluginDelegate* plugin_delegate = ResourceHelper::GetPluginDelegate(this); |
| 79 if (!plugin_delegate) | 81 if (!plugin_delegate) |
| 80 return; | 82 return; |
| 81 | 83 |
| 82 plugin_delegate->TCPSocketSSLHandshake(socket_id_, server_name, server_port); | 84 plugin_delegate->TCPSocketSSLHandshake(socket_id_, server_name, server_port, |
| 85 trusted_certs, untrusted_certs); |
| 83 } | 86 } |
| 84 | 87 |
| 85 void PPB_TCPSocket_Private_Impl::SendRead(int32_t bytes_to_read) { | 88 void PPB_TCPSocket_Private_Impl::SendRead(int32_t bytes_to_read) { |
| 86 PluginDelegate* plugin_delegate = ResourceHelper::GetPluginDelegate(this); | 89 PluginDelegate* plugin_delegate = ResourceHelper::GetPluginDelegate(this); |
| 87 if (!plugin_delegate) | 90 if (!plugin_delegate) |
| 88 return; | 91 return; |
| 89 | 92 |
| 90 plugin_delegate->TCPSocketRead(socket_id_, bytes_to_read); | 93 plugin_delegate->TCPSocketRead(socket_id_, bytes_to_read); |
| 91 } | 94 } |
| 92 | 95 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 110 PluginDelegate* PPB_TCPSocket_Private_Impl::GetPluginDelegate( | 113 PluginDelegate* PPB_TCPSocket_Private_Impl::GetPluginDelegate( |
| 111 PP_Instance instance) { | 114 PP_Instance instance) { |
| 112 PluginInstance* plugin_instance = HostGlobals::Get()->GetInstance(instance); | 115 PluginInstance* plugin_instance = HostGlobals::Get()->GetInstance(instance); |
| 113 if (!plugin_instance) | 116 if (!plugin_instance) |
| 114 return NULL; | 117 return NULL; |
| 115 return plugin_instance->delegate(); | 118 return plugin_instance->delegate(); |
| 116 } | 119 } |
| 117 | 120 |
| 118 } // namespace ppapi | 121 } // namespace ppapi |
| 119 } // namespace webkit | 122 } // namespace webkit |
| OLD | NEW |