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

Unified Diff: ppapi/cpp/private/flash_udp_socket.cc

Issue 8561033: Pepper: Add remaining Flash-specific C++ Pepper wrappers to ppapi_cpp.gypi. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 9 years, 1 month 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 | « ppapi/cpp/private/flash_udp_socket.h ('k') | ppapi/ppapi_cpp.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/cpp/private/flash_udp_socket.cc
diff --git a/ppapi/cpp/private/flash_udp_socket.cc b/ppapi/cpp/private/flash_udp_socket.cc
deleted file mode 100644
index 797f3ea2fda130e8f906ca38026b32da1ab8d5d8..0000000000000000000000000000000000000000
--- a/ppapi/cpp/private/flash_udp_socket.cc
+++ /dev/null
@@ -1,72 +0,0 @@
-// Copyright (c) 2011 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.
-
-#include "ppapi/cpp/private/flash_udp_socket.h"
-
-#include "ppapi/c/pp_bool.h"
-#include "ppapi/c/pp_errors.h"
-#include "ppapi/cpp/completion_callback.h"
-#include "ppapi/cpp/instance.h"
-#include "ppapi/cpp/module.h"
-#include "ppapi/cpp/module_impl.h"
-
-namespace pp {
-
-namespace {
-
-template <> const char* interface_name<PPB_Flash_UDPSocket>() {
- return PPB_FLASH_UDPSOCKET_INTERFACE;
-}
-
-} // namespace
-
-namespace flash {
-
-UDPSocket::UDPSocket(Instance* instance) {
- if (has_interface<PPB_Flash_UDPSocket>() && instance) {
- PassRefFromConstructor(get_interface<PPB_Flash_UDPSocket>()->Create(
- instance->pp_instance()));
- }
-}
-
-int32_t UDPSocket::Bind(const PP_NetAddress_Private* addr,
- const CompletionCallback& callback) {
- if (!has_interface<PPB_Flash_UDPSocket>())
- return PP_ERROR_NOINTERFACE;
- return get_interface<PPB_Flash_UDPSocket>()->Bind(
- pp_resource(), addr, callback.pp_completion_callback());
-}
-
-int32_t UDPSocket::RecvFrom(char* buffer,
- int32_t num_bytes,
- const CompletionCallback& callback) {
- if (!has_interface<PPB_Flash_UDPSocket>())
- return PP_ERROR_NOINTERFACE;
- return get_interface<PPB_Flash_UDPSocket>()->RecvFrom(
- pp_resource(), buffer, num_bytes, callback.pp_completion_callback());
-}
-
-bool UDPSocket::GetRecvFromAddress(PP_NetAddress_Private* addr) {
- if (!has_interface<PPB_Flash_UDPSocket>())
- return false;
-
- PP_Bool result = get_interface<PPB_Flash_UDPSocket>()->GetRecvFromAddress(
- pp_resource(), addr);
- return PP_ToBool(result);
-}
-
-int32_t UDPSocket::SendTo(const char* buffer,
- int32_t num_bytes,
- const PP_NetAddress_Private* addr,
- const CompletionCallback& callback) {
- if (!has_interface<PPB_Flash_UDPSocket>())
- return PP_ERROR_NOINTERFACE;
- return get_interface<PPB_Flash_UDPSocket>()->SendTo(
- pp_resource(), buffer, num_bytes, addr,
- callback.pp_completion_callback());
-}
-
-} // namespace flash
-} // namespace pp
-
« no previous file with comments | « ppapi/cpp/private/flash_udp_socket.h ('k') | ppapi/ppapi_cpp.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698