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

Unified Diff: webkit/plugins/ppapi/ppb_websocket_impl.cc

Issue 8989046: WebSocket Pepper API: add interfaces to handle binaryType attribute (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix reviewed points Created 8 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/plugins/ppapi/ppb_websocket_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/ppapi/ppb_websocket_impl.cc
diff --git a/webkit/plugins/ppapi/ppb_websocket_impl.cc b/webkit/plugins/ppapi/ppb_websocket_impl.cc
index ef2d6ddb396b8b957bee497dca137b817622893b..00dd7f504eb525db2661e39a06f57a1955ea32e4 100644
--- a/webkit/plugins/ppapi/ppb_websocket_impl.cc
+++ b/webkit/plugins/ppapi/ppb_websocket_impl.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -75,9 +75,12 @@ bool InValidStateToReceive(PP_WebSocketReadyState_Dev state) {
namespace webkit {
namespace ppapi {
+// TODO(toyoshim): Default value of binary_type_ must be
+// PP_WEBSOCKETBINARYTYPE_BLOB_DEV after supporting Blob.
PPB_WebSocket_Impl::PPB_WebSocket_Impl(PP_Instance instance)
: Resource(instance),
state_(PP_WEBSOCKETREADYSTATE_INVALID_DEV),
+ binary_type_(PP_WEBSOCKETBINARYTYPE_ARRAYBUFFER_DEV),
error_was_received_(false),
receive_callback_var_(NULL),
wait_for_receive_(false),
@@ -419,6 +422,16 @@ PP_Var PPB_WebSocket_Impl::GetURL() {
return url_->GetPPVar();
}
+PP_Bool PPB_WebSocket_Impl::SetBinaryType(
+ PP_WebSocketBinaryType_Dev binary_type) {
+ // TODO(toyoshim): Use WebKit new API to set the receiving binary type.
+ return PP_FALSE;
+}
+
+PP_WebSocketBinaryType_Dev PPB_WebSocket_Impl::GetBinaryType() {
+ return binary_type_;
+}
+
void PPB_WebSocket_Impl::didConnect() {
DCHECK_EQ(PP_WEBSOCKETREADYSTATE_CONNECTING_DEV, state_);
state_ = PP_WEBSOCKETREADYSTATE_OPEN_DEV;
« no previous file with comments | « webkit/plugins/ppapi/ppb_websocket_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698