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

Side by Side Diff: webkit/plugins/ppapi/mock_plugin_delegate.cc

Issue 9283022: Exposed Listen and Accept methods to plugin. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Added comment, fixed StopListening. Created 8 years, 10 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
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 "webkit/plugins/ppapi/mock_plugin_delegate.h" 5 #include "webkit/plugins/ppapi/mock_plugin_delegate.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/message_loop_proxy.h" 8 #include "base/message_loop_proxy.h"
9 #include "ppapi/c/pp_errors.h" 9 #include "ppapi/c/pp_errors.h"
10 #include "ppapi/shared_impl/ppapi_preferences.h" 10 #include "ppapi/shared_impl/ppapi_preferences.h"
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 int32_t bytes_to_read) { 259 int32_t bytes_to_read) {
260 } 260 }
261 261
262 void MockPluginDelegate::TCPSocketWrite(uint32 socket_id, 262 void MockPluginDelegate::TCPSocketWrite(uint32 socket_id,
263 const std::string& buffer) { 263 const std::string& buffer) {
264 } 264 }
265 265
266 void MockPluginDelegate::TCPSocketDisconnect(uint32 socket_id) { 266 void MockPluginDelegate::TCPSocketDisconnect(uint32 socket_id) {
267 } 267 }
268 268
269 void MockPluginDelegate::RegisterTCPSocket(PPB_TCPSocket_Private_Impl* socket,
270 uint32 socket_id) {
271 }
272
269 uint32 MockPluginDelegate::UDPSocketCreate() { 273 uint32 MockPluginDelegate::UDPSocketCreate() {
270 return 0; 274 return 0;
271 } 275 }
272 276
273 void MockPluginDelegate::UDPSocketBind(PPB_UDPSocket_Private_Impl* socket, 277 void MockPluginDelegate::UDPSocketBind(PPB_UDPSocket_Private_Impl* socket,
274 uint32 socket_id, 278 uint32 socket_id,
275 const PP_NetAddress_Private& addr) { 279 const PP_NetAddress_Private& addr) {
276 } 280 }
277 281
278 void MockPluginDelegate::UDPSocketRecvFrom(uint32 socket_id, 282 void MockPluginDelegate::UDPSocketRecvFrom(uint32 socket_id,
279 int32_t num_bytes) { 283 int32_t num_bytes) {
280 } 284 }
281 285
282 void MockPluginDelegate::UDPSocketSendTo(uint32 socket_id, 286 void MockPluginDelegate::UDPSocketSendTo(uint32 socket_id,
283 const std::string& buffer, 287 const std::string& buffer,
284 const PP_NetAddress_Private& addr) { 288 const PP_NetAddress_Private& addr) {
285 } 289 }
286 290
287 void MockPluginDelegate::UDPSocketClose(uint32 socket_id) { 291 void MockPluginDelegate::UDPSocketClose(uint32 socket_id) {
288 } 292 }
289 293
294 void MockPluginDelegate::TCPServerSocketListen(
295 PPB_TCPServerSocket_Private_Impl* socket,
296 uint32 temp_socket_id,
297 const PP_NetAddress_Private& addr,
298 int32_t backlog) {
299 }
300
301 void MockPluginDelegate::TCPServerSocketAccept(uint32 real_socket_id) {
302 }
303
304 void MockPluginDelegate::TCPServerSocketStopListening(uint32 real_socket_id,
305 uint32 temp_socket_id) {
306 }
307
290 int32_t MockPluginDelegate::ShowContextMenu( 308 int32_t MockPluginDelegate::ShowContextMenu(
291 PluginInstance* instance, 309 PluginInstance* instance,
292 webkit::ppapi::PPB_Flash_Menu_Impl* menu, 310 webkit::ppapi::PPB_Flash_Menu_Impl* menu,
293 const gfx::Point& position) { 311 const gfx::Point& position) {
294 return PP_ERROR_FAILED; 312 return PP_ERROR_FAILED;
295 } 313 }
296 314
297 FullscreenContainer* MockPluginDelegate::CreateFullscreenContainer( 315 FullscreenContainer* MockPluginDelegate::CreateFullscreenContainer(
298 PluginInstance* instance) { 316 PluginInstance* instance) {
299 return NULL; 317 return NULL;
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 bool MockPluginDelegate::IsInFullscreenMode() { 391 bool MockPluginDelegate::IsInFullscreenMode() {
374 return false; 392 return false;
375 } 393 }
376 394
377 bool MockPluginDelegate::IsPageVisible() const { 395 bool MockPluginDelegate::IsPageVisible() const {
378 return true; 396 return true;
379 } 397 }
380 398
381 } // namespace ppapi 399 } // namespace ppapi
382 } // namespace webkit 400 } // namespace webkit
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698