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

Unified Diff: ppapi/shared_impl/private/ppb_udp_socket_shared.h

Issue 11441012: PPB_UDPSocket_Private is switched to the new Pepper proxy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync. Created 8 years 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
Index: ppapi/shared_impl/private/ppb_udp_socket_shared.h
diff --git a/ppapi/shared_impl/private/udp_socket_private_impl.h b/ppapi/shared_impl/private/ppb_udp_socket_shared.h
similarity index 72%
rename from ppapi/shared_impl/private/udp_socket_private_impl.h
rename to ppapi/shared_impl/private/ppb_udp_socket_shared.h
index e8e3cb20e401045ff6a09b01ccc10d899beaed26..244213a0361fe0b800fd46c1f71a67734810b81e 100644
--- a/ppapi/shared_impl/private/udp_socket_private_impl.h
+++ b/ppapi/shared_impl/private/ppb_udp_socket_shared.h
@@ -2,32 +2,21 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef PPAPI_SHARED_IMPL_PRIVATE_UDP_SOCKET_PRIVATE_IMPL_H_
-#define PPAPI_SHARED_IMPL_PRIVATE_UDP_SOCKET_PRIVATE_IMPL_H_
-
-#include <string>
+#ifndef PPAPI_SHARED_IMPL_PRIVATE_PPB_UDP_SOCKET_SHARED_H_
+#define PPAPI_SHARED_IMPL_PRIVATE_PPB_UDP_SOCKET_SHARED_H_
#include "base/compiler_specific.h"
-#include "ppapi/shared_impl/resource.h"
+#include "ppapi/shared_impl/ppapi_shared_export.h"
#include "ppapi/shared_impl/tracked_callback.h"
#include "ppapi/thunk/ppb_udp_socket_private_api.h"
namespace ppapi {
-// This class provides the shared implementation of a
-// PPB_UDPSocket_Private. The functions that actually send messages
-// to browser are implemented differently for the proxied and
-// non-proxied derived classes.
-class PPAPI_SHARED_EXPORT UDPSocketPrivateImpl
- : public thunk::PPB_UDPSocket_Private_API,
- public Resource {
+class PPAPI_SHARED_EXPORT PPB_UDPSocket_Shared
+ : public thunk::PPB_UDPSocket_Private_API {
public:
- // C-tor used in Impl case.
- UDPSocketPrivateImpl(PP_Instance instance, uint32 socket_id);
- // C-tor used in Proxy case.
- UDPSocketPrivateImpl(const HostResource& resource, uint32 socket_id);
-
- virtual ~UDPSocketPrivateImpl();
+ PPB_UDPSocket_Shared();
+ virtual ~PPB_UDPSocket_Shared();
// The maximum number of bytes that each PpapiHostMsg_PPBUDPSocket_RecvFrom
// message is allowed to request.
@@ -36,9 +25,6 @@ class PPAPI_SHARED_EXPORT UDPSocketPrivateImpl
// message is allowed to carry.
static const int32_t kMaxWriteSize;
- // Resource overrides.
- virtual PPB_UDPSocket_Private_API* AsPPB_UDPSocket_Private_API() OVERRIDE;
-
// PPB_UDPSocket_Private_API implementation.
virtual int32_t SetSocketFeature(PP_UDPSocketFeature_Private name,
PP_Var value) OVERRIDE;
@@ -73,11 +59,8 @@ class PPAPI_SHARED_EXPORT UDPSocketPrivateImpl
virtual void SendClose() = 0;
protected:
- void Init(uint32 socket_id);
void PostAbortIfNecessary(scoped_refptr<TrackedCallback>* callback);
- uint32 socket_id_;
-
bool bound_;
bool closed_;
@@ -91,9 +74,9 @@ class PPAPI_SHARED_EXPORT UDPSocketPrivateImpl
PP_NetAddress_Private recvfrom_addr_;
PP_NetAddress_Private bound_addr_;
- DISALLOW_COPY_AND_ASSIGN(UDPSocketPrivateImpl);
+ DISALLOW_COPY_AND_ASSIGN(PPB_UDPSocket_Shared);
};
} // namespace ppapi
-#endif // PPAPI_SHARED_IMPL_PRIVATE_UDP_SOCKET_PRIVATE_IMPL_H_
+#endif // PPAPI_SHARED_IMPL_PRIVATE_PPB_UDP_SOCKET_SHARED_H_

Powered by Google App Engine
This is Rietveld 408576698