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

Unified Diff: ppapi/thunk/ppb_net_address_dev_thunk.cc

Issue 17419008: Move PPB_NetAddress out of dev. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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/thunk/ppb_net_address_api.h ('k') | ppapi/thunk/ppb_net_address_thunk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/thunk/ppb_net_address_dev_thunk.cc
diff --git a/ppapi/thunk/ppb_net_address_dev_thunk.cc b/ppapi/thunk/ppb_net_address_dev_thunk.cc
deleted file mode 100644
index 9f0e5088f61fb09cc088c180cfded11f6cda3bbc..0000000000000000000000000000000000000000
--- a/ppapi/thunk/ppb_net_address_dev_thunk.cc
+++ /dev/null
@@ -1,98 +0,0 @@
-// Copyright 2013 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/c/dev/ppb_net_address_dev.h"
-#include "ppapi/c/pp_errors.h"
-#include "ppapi/shared_impl/tracked_callback.h"
-#include "ppapi/thunk/enter.h"
-#include "ppapi/thunk/ppb_instance_api.h"
-#include "ppapi/thunk/ppb_net_address_api.h"
-#include "ppapi/thunk/resource_creation_api.h"
-#include "ppapi/thunk/thunk.h"
-
-namespace ppapi {
-namespace thunk {
-
-namespace {
-
-PP_Resource CreateFromIPv4Address(
- PP_Instance instance,
- const struct PP_NetAddress_IPv4_Dev* ipv4_addr) {
- VLOG(4) << "PPB_NetAddress_Dev::CreateFromIPv4Address()";
- EnterResourceCreation enter(instance);
- if (enter.failed())
- return 0;
- return enter.functions()->CreateNetAddressFromIPv4Address(instance,
- ipv4_addr);
-}
-
-PP_Resource CreateFromIPv6Address(
- PP_Instance instance,
- const struct PP_NetAddress_IPv6_Dev* ipv6_addr) {
- VLOG(4) << "PPB_NetAddress_Dev::CreateFromIPv6Address()";
- EnterResourceCreation enter(instance);
- if (enter.failed())
- return 0;
- return enter.functions()->CreateNetAddressFromIPv6Address(instance,
- ipv6_addr);
-}
-
-PP_Bool IsNetAddress(PP_Resource addr) {
- VLOG(4) << "PPB_NetAddress_Dev::IsNetAddress()";
- EnterResource<PPB_NetAddress_API> enter(addr, false);
- return PP_FromBool(enter.succeeded());
-}
-
-PP_NetAddress_Family_Dev GetFamily(PP_Resource addr) {
- VLOG(4) << "PPB_NetAddress_Dev::GetFamily()";
- EnterResource<PPB_NetAddress_API> enter(addr, true);
- if (enter.failed())
- return PP_NETADDRESS_FAMILY_UNSPECIFIED;
- return enter.object()->GetFamily();
-}
-
-struct PP_Var DescribeAsString(PP_Resource addr, PP_Bool include_port) {
- VLOG(4) << "PPB_NetAddress_Dev::DescribeAsString()";
- EnterResource<PPB_NetAddress_API> enter(addr, true);
- if (enter.failed())
- return PP_MakeUndefined();
- return enter.object()->DescribeAsString(include_port);
-}
-
-PP_Bool DescribeAsIPv4Address(PP_Resource addr,
- struct PP_NetAddress_IPv4_Dev* ipv4_addr) {
- VLOG(4) << "PPB_NetAddress_Dev::DescribeAsIPv4Address()";
- EnterResource<PPB_NetAddress_API> enter(addr, true);
- if (enter.failed())
- return PP_FALSE;
- return enter.object()->DescribeAsIPv4Address(ipv4_addr);
-}
-
-PP_Bool DescribeAsIPv6Address(PP_Resource addr,
- struct PP_NetAddress_IPv6_Dev* ipv6_addr) {
- VLOG(4) << "PPB_NetAddress_Dev::DescribeAsIPv6Address()";
- EnterResource<PPB_NetAddress_API> enter(addr, true);
- if (enter.failed())
- return PP_FALSE;
- return enter.object()->DescribeAsIPv6Address(ipv6_addr);
-}
-
-const PPB_NetAddress_Dev_0_1 g_ppb_netaddress_dev_thunk_0_1 = {
- &CreateFromIPv4Address,
- &CreateFromIPv6Address,
- &IsNetAddress,
- &GetFamily,
- &DescribeAsString,
- &DescribeAsIPv4Address,
- &DescribeAsIPv6Address
-};
-
-} // namespace
-
-const PPB_NetAddress_Dev_0_1* GetPPB_NetAddress_Dev_0_1_Thunk() {
- return &g_ppb_netaddress_dev_thunk_0_1;
-}
-
-} // namespace thunk
-} // namespace ppapi
« no previous file with comments | « ppapi/thunk/ppb_net_address_api.h ('k') | ppapi/thunk/ppb_net_address_thunk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698