diff options
author | toyoshim@chromium.org <toyoshim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-27 06:07:25 +0000 |
---|---|---|
committer | toyoshim@chromium.org <toyoshim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-27 06:07:25 +0000 |
commit | dc909a9e56db63a207f21d2056c86f531aedc18f (patch) | |
tree | 91e9c7df3d8ff83b94e7528f28be4f15478b0188 /webkit | |
parent | 1c6027f1ae1f33a7ead07bfb767843a1170b8da7 (diff) | |
download | chromium_src-dc909a9e56db63a207f21d2056c86f531aedc18f.zip chromium_src-dc909a9e56db63a207f21d2056c86f531aedc18f.tar.gz chromium_src-dc909a9e56db63a207f21d2056c86f531aedc18f.tar.bz2 |
WebSocket Pepper API: Remove binary type handling interfaces
In an API discussion, we decide to remove binary type handling interfaces
from the first release. This change just fix the interface. The change to
make the interface out of dev will follow this change.
BUG=87310
TEST=ui_test --gtest_filter='*WebSocket*'
Review URL: https://chromiumcodereview.appspot.com/9296001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119382 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/plugins/ppapi/ppb_websocket_impl.cc | 35 | ||||
-rw-r--r-- | webkit/plugins/ppapi/ppb_websocket_impl.h | 4 |
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_; |