Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(223)

Side by Side Diff: webkit/plugins/ppapi/ppb_tcp_socket_private_impl.cc

Issue 12220050: Provide a way to disable Nagle's algorithm on Pepper TCP sockets. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add missing completion callback implementation. Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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::SendBoolSocketFeature(int32_t name,
114 bool value) {
115 PluginDelegate* plugin_delegate = ResourceHelper::GetPluginDelegate(this);
116 if (!plugin_delegate)
117 return;
118
119 plugin_delegate->TCPSocketSetBoolFeature(socket_id_, name, value);
120 }
121
113 PluginDelegate* PPB_TCPSocket_Private_Impl::GetPluginDelegate( 122 PluginDelegate* PPB_TCPSocket_Private_Impl::GetPluginDelegate(
114 PP_Instance instance) { 123 PP_Instance instance) {
115 PluginInstance* plugin_instance = HostGlobals::Get()->GetInstance(instance); 124 PluginInstance* plugin_instance = HostGlobals::Get()->GetInstance(instance);
116 if (!plugin_instance) 125 if (!plugin_instance)
117 return NULL; 126 return NULL;
118 return plugin_instance->delegate(); 127 return plugin_instance->delegate();
119 } 128 }
120 129
121 } // namespace ppapi 130 } // namespace ppapi
122 } // namespace webkit 131 } // namespace webkit
OLDNEW
« webkit/plugins/ppapi/plugin_delegate.h ('K') | « webkit/plugins/ppapi/ppb_tcp_socket_private_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698