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

Side by Side Diff: ppapi/cpp/dev/websocket_dev.cc

Issue 9296001: WebSocket Pepper API: Remove binary type handling interfaces (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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 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 "ppapi/cpp/dev/websocket_dev.h" 5 #include "ppapi/cpp/dev/websocket_dev.h"
6 6
7 #include "ppapi/c/pp_errors.h" 7 #include "ppapi/c/pp_errors.h"
8 #include "ppapi/c/pp_macros.h" 8 #include "ppapi/c/pp_macros.h"
9 #include "ppapi/cpp/completion_callback.h" 9 #include "ppapi/cpp/completion_callback.h"
10 #include "ppapi/cpp/instance.h" 10 #include "ppapi/cpp/instance.h"
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 } 138 }
139 139
140 Var WebSocket_Dev::GetURL() { 140 Var WebSocket_Dev::GetURL() {
141 if (!has_interface<PPB_WebSocket_Dev>()) 141 if (!has_interface<PPB_WebSocket_Dev>())
142 return Var(); 142 return Var();
143 143
144 return Var(Var::PassRef(), 144 return Var(Var::PassRef(),
145 get_interface<PPB_WebSocket_Dev>()->GetURL(pp_resource())); 145 get_interface<PPB_WebSocket_Dev>()->GetURL(pp_resource()));
146 } 146 }
147 147
148 bool WebSocket_Dev::SetBinaryType(PP_WebSocketBinaryType_Dev binary_type) {
149 if (!has_interface<PPB_WebSocket_Dev>())
150 return false;
151 return PP_ToBool(get_interface<PPB_WebSocket_Dev>()->SetBinaryType(
152 pp_resource(), binary_type));
153 }
154
155 PP_WebSocketBinaryType_Dev WebSocket_Dev::GetBinaryType() {
156 if (!has_interface<PPB_WebSocket_Dev>())
157 return PP_WEBSOCKETBINARYTYPE_INVALID;
158 return get_interface<PPB_WebSocket_Dev>()->GetBinaryType(pp_resource());
159 }
160
161 } // namespace pp 148 } // namespace pp
OLDNEW
« no previous file with comments | « ppapi/cpp/dev/websocket_dev.h ('k') | ppapi/native_client/src/shared/ppapi_proxy/browser_ppb_websocket_rpc_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698