summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
Diffstat (limited to 'webkit')
-rw-r--r--webkit/plugins/ppapi/ppb_websocket_impl.cc35
-rw-r--r--webkit/plugins/ppapi/ppb_websocket_impl.h4
2 files changed, 1 insertions, 38 deletions
diff --git a/webkit/plugins/ppapi/ppb_websocket_impl.cc b/webkit/plugins/ppapi/ppb_websocket_impl.cc
index 760a4e4..be42d7e 100644
--- a/webkit/plugins/ppapi/ppb_websocket_impl.cc
+++ b/webkit/plugins/ppapi/ppb_websocket_impl.cc
@@ -80,7 +80,6 @@ namespace ppapi {
PPB_WebSocket_Impl::PPB_WebSocket_Impl(PP_Instance instance)
: Resource(instance),
state_(PP_WEBSOCKETREADYSTATE_INVALID_DEV),
- binary_type_(WebSocket::BinaryTypeBlob),
error_was_received_(false),
receive_callback_var_(NULL),
wait_for_receive_(false),
@@ -196,7 +195,7 @@ int32_t PPB_WebSocket_Impl::Connect(PP_Var url,
return PP_ERROR_NOTSUPPORTED;
// Set receiving binary object type.
- websocket_->setBinaryType(binary_type_);
+ websocket_->setBinaryType(WebSocket::BinaryTypeArrayBuffer);
websocket_->connect(web_url, web_protocols);
state_ = PP_WEBSOCKETREADYSTATE_CONNECTING_DEV;
@@ -413,38 +412,6 @@ PP_Var PPB_WebSocket_Impl::GetURL() {
return url_->GetPPVar();
}
-PP_Bool PPB_WebSocket_Impl::SetBinaryType(
- PP_WebSocketBinaryType_Dev binary_type) {
- switch (binary_type) {
- case PP_WEBSOCKETBINARYTYPE_BLOB_DEV:
- binary_type_ = WebSocket::BinaryTypeBlob;
- break;
- case PP_WEBSOCKETBINARYTYPE_ARRAYBUFFER_DEV:
- binary_type_ = WebSocket::BinaryTypeArrayBuffer;
- break;
- default:
- return PP_FALSE;
- }
- // WebKit API setBinaryType() is called when Connect() is called.
- // If the websocket_ contains an object; it means Connect() is already
- // called, call WebKit API here to reflect the setting as soon as possible.
- if (websocket_.get())
- websocket_->setBinaryType(binary_type_);
- return PP_TRUE;
-}
-
-PP_WebSocketBinaryType_Dev PPB_WebSocket_Impl::GetBinaryType() {
- switch (binary_type_) {
- case WebSocket::BinaryTypeBlob:
- return PP_WEBSOCKETBINARYTYPE_BLOB_DEV;
- case WebSocket::BinaryTypeArrayBuffer:
- return PP_WEBSOCKETBINARYTYPE_ARRAYBUFFER_DEV;
- default:
- NOTREACHED();
- return PP_WEBSOCKETBINARYTYPE_INVALID;
- }
-}
-
void PPB_WebSocket_Impl::didConnect() {
DCHECK_EQ(PP_WEBSOCKETREADYSTATE_CONNECTING_DEV, state_);
state_ = PP_WEBSOCKETREADYSTATE_OPEN_DEV;
diff --git a/webkit/plugins/ppapi/ppb_websocket_impl.h b/webkit/plugins/ppapi/ppb_websocket_impl.h
index bd6f6c8..5e2021f 100644
--- a/webkit/plugins/ppapi/ppb_websocket_impl.h
+++ b/webkit/plugins/ppapi/ppb_websocket_impl.h
@@ -55,9 +55,6 @@ class PPB_WebSocket_Impl : public ::ppapi::Resource,
virtual PP_Var GetProtocol() OVERRIDE;
virtual PP_WebSocketReadyState_Dev GetReadyState() OVERRIDE;
virtual PP_Var GetURL() OVERRIDE;
- virtual PP_Bool SetBinaryType(
- PP_WebSocketBinaryType_Dev binary_type) OVERRIDE;
- virtual PP_WebSocketBinaryType_Dev GetBinaryType() OVERRIDE;
// WebSocketClient implementation.
virtual void didConnect();
@@ -75,7 +72,6 @@ class PPB_WebSocket_Impl : public ::ppapi::Resource,
scoped_ptr<WebKit::WebSocket> websocket_;
PP_WebSocketReadyState_Dev state_;
- WebKit::WebSocket::BinaryType binary_type_;
bool error_was_received_;
scoped_refptr< ::ppapi::TrackedCallback> connect_callback_;