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

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

Issue 9568007: Added CPP wrapper for PPB_TCPServerSocket_Private. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Restored IsAvailable method, fixed TCPSocketPrivate constructor. Created 8 years, 9 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
Index: ppapi/cpp/private/tcp_socket_private.cc
diff --git a/ppapi/cpp/private/tcp_socket_private.cc b/ppapi/cpp/private/tcp_socket_private.cc
index 9e2c1f6ac9136f4d919f288a3c9541fde950066b..5af22604212728a34f3e26b8edb7c26408c56541 100644
--- a/ppapi/cpp/private/tcp_socket_private.cc
+++ b/ppapi/cpp/private/tcp_socket_private.cc
@@ -28,6 +28,13 @@ TCPSocketPrivate::TCPSocketPrivate(const InstanceHandle& instance) {
}
}
ygorshenin1 2012/03/07 11:17:29 I'm still afraid, that if PPB_TCPSocket_Private in
yzshen1 2012/03/07 17:27:05 You could release it using ReleaseResource() in pp
ygorshenin1 2012/03/07 17:40:40 Sure, but how to notify user about that? On 2012/
yzshen1 2012/03/07 17:56:49 is_null() will be true. If the user expects the r
brettw 2012/03/08 18:47:17 I'd just delete the if and call the default resour
ygorshenin1 2012/03/11 09:39:33 Done.
+TCPSocketPrivate::TCPSocketPrivate(PassRef, PP_Resource resource) {
+ if (has_interface<PPB_TCPSocket_Private>() &&
+ get_interface<PPB_TCPSocket_Private>()->IsTCPSocket(resource)) {
+ PassRefFromConstructor(resource);
+ }
+}
+
// static
bool TCPSocketPrivate::IsAvailable() {
return has_interface<PPB_TCPSocket_Private>();

Powered by Google App Engine
This is Rietveld 408576698