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

Unified Diff: ppapi/cpp/dev/transport_dev.cc

Issue 10454058: Remove PPB_Transport_Dev API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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 | « ppapi/cpp/dev/transport_dev.h ('k') | ppapi/ppapi_proxy_untrusted.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/cpp/dev/transport_dev.cc
diff --git a/ppapi/cpp/dev/transport_dev.cc b/ppapi/cpp/dev/transport_dev.cc
deleted file mode 100644
index c1153b8c621a5360999516957fed340f2d5c0610..0000000000000000000000000000000000000000
--- a/ppapi/cpp/dev/transport_dev.cc
+++ /dev/null
@@ -1,94 +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/dev/transport_dev.h"
-
-#include "ppapi/c/pp_errors.h"
-#include "ppapi/cpp/instance_handle.h"
-#include "ppapi/cpp/resource.h"
-#include "ppapi/cpp/module.h"
-#include "ppapi/cpp/module_impl.h"
-#include "ppapi/cpp/var.h"
-
-namespace pp {
-
-namespace {
-
-template <> const char* interface_name<PPB_Transport_Dev>() {
- return PPB_TRANSPORT_DEV_INTERFACE;
-}
-
-} // namespace
-
-Transport_Dev::Transport_Dev(const InstanceHandle& instance,
- const char* name,
- PP_TransportType type) {
- if (has_interface<PPB_Transport_Dev>())
- PassRefFromConstructor(get_interface<PPB_Transport_Dev>()->CreateTransport(
- instance.pp_instance(), name, type));
-}
-
-bool Transport_Dev::IsWritable() {
- if (!has_interface<PPB_Transport_Dev>())
- return false;
- return PP_ToBool(
- get_interface<PPB_Transport_Dev>()->IsWritable(pp_resource()));
-}
-
-int32_t Transport_Dev::SetProperty(PP_TransportProperty property,
- const Var& value) {
- if (!has_interface<PPB_Transport_Dev>())
- return PP_ERROR_NOINTERFACE;
- return get_interface<PPB_Transport_Dev>()->SetProperty(
- pp_resource(), property, value.pp_var());
-}
-
-int32_t Transport_Dev::Connect(const CompletionCallback& cc) {
- if (!has_interface<PPB_Transport_Dev>())
- return cc.MayForce(PP_ERROR_NOINTERFACE);
- return get_interface<PPB_Transport_Dev>()->Connect(
- pp_resource(), cc.pp_completion_callback());
-}
-
-int32_t Transport_Dev::GetNextAddress(Var* address,
- const CompletionCallback& cc) {
- if (!has_interface<PPB_Transport_Dev>())
- return cc.MayForce(PP_ERROR_NOINTERFACE);
- PP_Var temp_address = PP_MakeUndefined();
- int32_t ret_val = get_interface<PPB_Transport_Dev>()->GetNextAddress(
- pp_resource(), &temp_address, cc.pp_completion_callback());
- *address = Var(PASS_REF, temp_address);
- return ret_val;
-}
-
-int32_t Transport_Dev::ReceiveRemoteAddress(const pp::Var& address) {
- if (!has_interface<PPB_Transport_Dev>())
- return PP_ERROR_NOINTERFACE;
- return get_interface<PPB_Transport_Dev>()->ReceiveRemoteAddress(
- pp_resource(), address.pp_var());
-}
-
-int32_t Transport_Dev::Recv(void* data, uint32_t len,
- const CompletionCallback& cc) {
- if (!has_interface<PPB_Transport_Dev>())
- return cc.MayForce(PP_ERROR_NOINTERFACE);
- return get_interface<PPB_Transport_Dev>()->Recv(
- pp_resource(), data, len, cc.pp_completion_callback());
-}
-
-int32_t Transport_Dev::Send(const void* data, uint32_t len,
- const CompletionCallback& cc) {
- if (!has_interface<PPB_Transport_Dev>())
- return cc.MayForce(PP_ERROR_NOINTERFACE);
- return get_interface<PPB_Transport_Dev>()->Send(
- pp_resource(), data, len, cc.pp_completion_callback());
-}
-
-int32_t Transport_Dev::Close() {
- if (!has_interface<PPB_Transport_Dev>())
- return PP_ERROR_NOINTERFACE;
- return get_interface<PPB_Transport_Dev>()->Close(pp_resource());
-}
-
-} // namespace pp
« no previous file with comments | « ppapi/cpp/dev/transport_dev.h ('k') | ppapi/ppapi_proxy_untrusted.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698