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

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 Destroy message for initialized but cancelled sockets. 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::TCPSocketRegister(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 bool MockPluginDelegate::TCPServerSocketInitialize(
295 PPB_TCPSocket_Private_Impl* socket) {
296 return false;
297 }
298
299 void MockPluginDelegate::TCPServerSocketListen(
300 PPB_TCPServerSocket_Private_Impl* socket,
301 uint32 socket_id,
302 const PP_NetAddress_Private& addr,
303 int32_t backlog) {
304 }
305
306 void MockPluginDelegate::TCPServerSocketAccept(uint32 socket_id) {
307 }
308
309 void MockPluginDelegate::TCPServerSocketStopListening(uint32 socket_id) {
310 }
311
290 int32_t MockPluginDelegate::ShowContextMenu( 312 int32_t MockPluginDelegate::ShowContextMenu(
291 PluginInstance* instance, 313 PluginInstance* instance,
292 webkit::ppapi::PPB_Flash_Menu_Impl* menu, 314 webkit::ppapi::PPB_Flash_Menu_Impl* menu,
293 const gfx::Point& position) { 315 const gfx::Point& position) {
294 return PP_ERROR_FAILED; 316 return PP_ERROR_FAILED;
295 } 317 }
296 318
297 FullscreenContainer* MockPluginDelegate::CreateFullscreenContainer( 319 FullscreenContainer* MockPluginDelegate::CreateFullscreenContainer(
298 PluginInstance* instance) { 320 PluginInstance* instance) {
299 return NULL; 321 return NULL;
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 bool MockPluginDelegate::IsInFullscreenMode() { 395 bool MockPluginDelegate::IsInFullscreenMode() {
374 return false; 396 return false;
375 } 397 }
376 398
377 bool MockPluginDelegate::IsPageVisible() const { 399 bool MockPluginDelegate::IsPageVisible() const {
378 return true; 400 return true;
379 } 401 }
380 402
381 } // namespace ppapi 403 } // namespace ppapi
382 } // namespace webkit 404 } // namespace webkit
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698