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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 } | 103 } |
104 | 104 |
105 void PPB_TCPSocket_Private_Impl::SendDisconnect() { | 105 void PPB_TCPSocket_Private_Impl::SendDisconnect() { |
106 PluginDelegate* plugin_delegate = ResourceHelper::GetPluginDelegate(this); | 106 PluginDelegate* plugin_delegate = ResourceHelper::GetPluginDelegate(this); |
107 if (!plugin_delegate) | 107 if (!plugin_delegate) |
108 return; | 108 return; |
109 | 109 |
110 plugin_delegate->TCPSocketDisconnect(socket_id_); | 110 plugin_delegate->TCPSocketDisconnect(socket_id_); |
111 } | 111 } |
112 | 112 |
| 113 void PPB_TCPSocket_Private_Impl::SendSetBoolOption( |
| 114 PP_TCPSocketOption_Private name, |
| 115 bool value) { |
| 116 PluginDelegate* plugin_delegate = ResourceHelper::GetPluginDelegate(this); |
| 117 if (!plugin_delegate) |
| 118 return; |
| 119 |
| 120 plugin_delegate->TCPSocketSetBoolOption(socket_id_, name, value); |
| 121 } |
| 122 |
113 PluginDelegate* PPB_TCPSocket_Private_Impl::GetPluginDelegate( | 123 PluginDelegate* PPB_TCPSocket_Private_Impl::GetPluginDelegate( |
114 PP_Instance instance) { | 124 PP_Instance instance) { |
115 PluginInstance* plugin_instance = HostGlobals::Get()->GetInstance(instance); | 125 PluginInstance* plugin_instance = HostGlobals::Get()->GetInstance(instance); |
116 if (!plugin_instance) | 126 if (!plugin_instance) |
117 return NULL; | 127 return NULL; |
118 return plugin_instance->delegate(); | 128 return plugin_instance->delegate(); |
119 } | 129 } |
120 | 130 |
121 } // namespace ppapi | 131 } // namespace ppapi |
122 } // namespace webkit | 132 } // namespace webkit |
OLD | NEW |