diff options
author | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-30 22:44:53 +0000 |
---|---|---|
committer | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-30 22:44:53 +0000 |
commit | 4fb0f20f7cd1e2b82eb7295f62dc6cb31bb262c5 (patch) | |
tree | 50be96f44d854af30b3c1d10ad0b7658da2e1155 /ppapi/thunk | |
parent | b5b1563868c6771a52110ab93fa0c12ce6c545ec (diff) | |
download | chromium_src-4fb0f20f7cd1e2b82eb7295f62dc6cb31bb262c5.zip chromium_src-4fb0f20f7cd1e2b82eb7295f62dc6cb31bb262c5.tar.gz chromium_src-4fb0f20f7cd1e2b82eb7295f62dc6cb31bb262c5.tar.bz2 |
Remove PPB_Transport_Dev API.
BUG=109630
Review URL: https://chromiumcodereview.appspot.com/10454058
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@139660 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/thunk')
-rw-r--r-- | ppapi/thunk/interfaces_ppb_public_dev.h | 3 | ||||
-rw-r--r-- | ppapi/thunk/ppb_transport_api.h | 33 | ||||
-rw-r--r-- | ppapi/thunk/ppb_transport_thunk.cc | 112 | ||||
-rw-r--r-- | ppapi/thunk/resource_creation_api.h | 4 |
4 files changed, 0 insertions, 152 deletions
diff --git a/ppapi/thunk/interfaces_ppb_public_dev.h b/ppapi/thunk/interfaces_ppb_public_dev.h index 692b4f3..f23bb48 100644 --- a/ppapi/thunk/interfaces_ppb_public_dev.h +++ b/ppapi/thunk/interfaces_ppb_public_dev.h @@ -14,7 +14,6 @@ PROXIED_API(PPB_FileChooser) PROXIED_API(PPB_Graphics3D) UNPROXIED_API(PPB_LayerCompositor) UNPROXIED_API(PPB_Scrollbar) -UNPROXIED_API(PPB_Transport) PROXIED_API(PPB_VideoCapture) PROXIED_API(PPB_VideoDecoder) UNPROXIED_API(PPB_WebSocket) @@ -60,8 +59,6 @@ PROXIED_IFACE(PPB_Instance, PPB_TEXTINPUT_DEV_INTERFACE_0_1, PPB_TextInput_Dev_0_1) PROXIED_IFACE(PPB_Instance, PPB_TEXTINPUT_DEV_INTERFACE_0_2, PPB_TextInput_Dev_0_2) -UNPROXIED_IFACE(PPB_Transport, PPB_TRANSPORT_DEV_INTERFACE_0_7, - PPB_Transport_Dev_0_7) PROXIED_IFACE(PPB_VideoCapture, PPB_VIDEOCAPTURE_DEV_INTERFACE_0_1, PPB_VideoCapture_Dev_0_1) PROXIED_IFACE(PPB_VideoCapture, PPB_VIDEOCAPTURE_DEV_INTERFACE_0_2, diff --git a/ppapi/thunk/ppb_transport_api.h b/ppapi/thunk/ppb_transport_api.h deleted file mode 100644 index 256d920..0000000 --- a/ppapi/thunk/ppb_transport_api.h +++ /dev/null @@ -1,33 +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. - -#ifndef PPAPI_THUNK_PPB_TRANSPORT_API_H_ -#define PPAPI_THUNK_PPB_TRANSPORT_API_H_ - -#include "ppapi/c/dev/ppb_transport_dev.h" - -namespace ppapi { -namespace thunk { - -class PPB_Transport_API { - public: - virtual ~PPB_Transport_API() {} - - virtual PP_Bool IsWritable() = 0; - virtual int32_t SetProperty(PP_TransportProperty property, PP_Var value) = 0; - virtual int32_t Connect(PP_CompletionCallback callback) = 0; - virtual int32_t GetNextAddress(PP_Var* address, - PP_CompletionCallback callback) = 0; - virtual int32_t ReceiveRemoteAddress(PP_Var address) = 0; - virtual int32_t Recv(void* data, uint32_t len, - PP_CompletionCallback callback) = 0; - virtual int32_t Send(const void* data, uint32_t len, - PP_CompletionCallback callback) = 0; - virtual int32_t Close() = 0; -}; - -} // namespace thunk -} // namespace ppapi - -#endif // PPAPI_THUNK_PPB_TRANSPORT_API_H_ diff --git a/ppapi/thunk/ppb_transport_thunk.cc b/ppapi/thunk/ppb_transport_thunk.cc deleted file mode 100644 index d739e89..0000000 --- a/ppapi/thunk/ppb_transport_thunk.cc +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright (c) 2012 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/pp_completion_callback.h" -#include "ppapi/c/pp_errors.h" -#include "ppapi/thunk/enter.h" -#include "ppapi/thunk/thunk.h" -#include "ppapi/thunk/ppb_transport_api.h" -#include "ppapi/thunk/resource_creation_api.h" - -namespace ppapi { -namespace thunk { - -namespace { - -typedef EnterResource<PPB_Transport_API> EnterTransport; - -PP_Resource Create(PP_Instance instance, const char* name, - PP_TransportType type) { - EnterResourceCreation enter(instance); - if (enter.failed()) - return 0; - return enter.functions()->CreateTransport(instance, name, type); -} - -PP_Bool IsTransport(PP_Resource resource) { - EnterTransport enter(resource, false); - return PP_FromBool(enter.succeeded()); -} - -PP_Bool IsWritable(PP_Resource transport) { - EnterTransport enter(transport, true); - if (enter.failed()) - return PP_FALSE; - return enter.object()->IsWritable(); -} - -int32_t SetProperty(PP_Resource transport, PP_TransportProperty property, - PP_Var value) { - EnterTransport enter(transport, true); - if (enter.failed()) - return enter.retval(); - return enter.object()->SetProperty(property, value); -} - -int32_t Connect(PP_Resource transport, PP_CompletionCallback callback) { - EnterTransport enter(transport, callback, true); - if (enter.failed()) - return enter.retval(); - return enter.SetResult(enter.object()->Connect(callback)); -} - -int32_t GetNextAddress(PP_Resource transport, PP_Var* address, - PP_CompletionCallback callback) { - EnterTransport enter(transport, callback, true); - if (enter.failed()) - return enter.retval(); - return enter.SetResult(enter.object()->GetNextAddress(address, callback)); -} - -int32_t ReceiveRemoteAddress(PP_Resource transport, PP_Var address) { - EnterTransport enter(transport, true); - if (enter.failed()) - return enter.retval(); - return enter.object()->ReceiveRemoteAddress(address); -} - -int32_t Recv(PP_Resource transport, void* data, uint32_t len, - PP_CompletionCallback callback) { - EnterTransport enter(transport, callback, true); - if (enter.failed()) - return enter.retval(); - return enter.SetResult(enter.object()->Recv(data, len, callback)); -} - -int32_t Send(PP_Resource transport, const void* data, uint32_t len, - PP_CompletionCallback callback) { - EnterTransport enter(transport, callback, true); - if (enter.failed()) - return enter.retval(); - return enter.SetResult(enter.object()->Send(data, len, callback)); -} - -int32_t Close(PP_Resource transport) { - EnterTransport enter(transport, true); - if (enter.failed()) - return enter.retval(); - return enter.object()->Close(); -} - -const PPB_Transport_Dev g_ppb_transport_thunk = { - &Create, - &IsTransport, - &IsWritable, - &SetProperty, - &Connect, - &GetNextAddress, - &ReceiveRemoteAddress, - &Recv, - &Send, - &Close, -}; - -} // namespace - -const PPB_Transport_Dev_0_7* GetPPB_Transport_Dev_0_7_Thunk() { - return &g_ppb_transport_thunk; -} - -} // namespace thunk -} // namespace ppapi diff --git a/ppapi/thunk/resource_creation_api.h b/ppapi/thunk/resource_creation_api.h index 2f214e7..3cd1752 100644 --- a/ppapi/thunk/resource_creation_api.h +++ b/ppapi/thunk/resource_creation_api.h @@ -19,7 +19,6 @@ #include "ppapi/c/ppb_input_event.h" #include "ppapi/c/ppb_websocket.h" #include "ppapi/c/dev/pp_video_dev.h" -#include "ppapi/c/dev/ppb_transport_dev.h" #include "ppapi/c/private/ppb_network_monitor_private.h" #include "ppapi/shared_impl/api_id.h" @@ -138,9 +137,6 @@ class ResourceCreationAPI { virtual PP_Resource CreateTalk(PP_Instance instance) = 0; virtual PP_Resource CreateTCPServerSocketPrivate(PP_Instance instance) = 0; virtual PP_Resource CreateTCPSocketPrivate(PP_Instance instace) = 0; - virtual PP_Resource CreateTransport(PP_Instance instance, - const char* name, - PP_TransportType type) = 0; virtual PP_Resource CreateUDPSocketPrivate(PP_Instance instace) = 0; virtual PP_Resource CreateVideoCapture(PP_Instance instance) = 0; virtual PP_Resource CreateVideoDecoder( |