OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/tcp_socket_private_resource.h" | 5 #include "ppapi/proxy/tcp_socket_private_resource.h" |
6 | 6 |
7 #include "ppapi/proxy/ppapi_messages.h" | 7 #include "ppapi/proxy/ppapi_messages.h" |
8 #include "ppapi/shared_impl/ppb_tcp_socket_shared.h" | 8 #include "ppapi/shared_impl/ppb_tcp_socket_shared.h" |
9 | 9 |
10 namespace ppapi { | 10 namespace ppapi { |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 } | 94 } |
95 | 95 |
96 int32_t TCPSocketPrivateResource::SetOption( | 96 int32_t TCPSocketPrivateResource::SetOption( |
97 PP_TCPSocketOption_Private name, | 97 PP_TCPSocketOption_Private name, |
98 const PP_Var& value, | 98 const PP_Var& value, |
99 scoped_refptr<TrackedCallback> callback) { | 99 scoped_refptr<TrackedCallback> callback) { |
100 switch (name) { | 100 switch (name) { |
101 case PP_TCPSOCKETOPTION_PRIVATE_INVALID: | 101 case PP_TCPSOCKETOPTION_PRIVATE_INVALID: |
102 return PP_ERROR_BADARGUMENT; | 102 return PP_ERROR_BADARGUMENT; |
103 case PP_TCPSOCKETOPTION_PRIVATE_NO_DELAY: | 103 case PP_TCPSOCKETOPTION_PRIVATE_NO_DELAY: |
104 return SetOptionImpl(PP_TCPSOCKET_OPTION_NO_DELAY, value, callback); | 104 return SetOptionImpl(PP_TCPSOCKET_OPTION_NO_DELAY, value, |
| 105 true, // Check connect() state. |
| 106 callback); |
105 default: | 107 default: |
106 NOTREACHED(); | 108 NOTREACHED(); |
107 return PP_ERROR_BADARGUMENT; | 109 return PP_ERROR_BADARGUMENT; |
108 } | 110 } |
109 } | 111 } |
110 | 112 |
111 PP_Resource TCPSocketPrivateResource::CreateAcceptedSocket( | 113 PP_Resource TCPSocketPrivateResource::CreateAcceptedSocket( |
112 int /* pending_host_id */, | 114 int /* pending_host_id */, |
113 const PP_NetAddress_Private& /* local_addr */, | 115 const PP_NetAddress_Private& /* local_addr */, |
114 const PP_NetAddress_Private& /* remote_addr */) { | 116 const PP_NetAddress_Private& /* remote_addr */) { |
115 NOTREACHED(); | 117 NOTREACHED(); |
116 return 0; | 118 return 0; |
117 } | 119 } |
118 | 120 |
119 } // namespace proxy | 121 } // namespace proxy |
120 } // namespace ppapi | 122 } // namespace ppapi |
OLD | NEW |