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

Unified Diff: ppapi/cpp/websocket.cc

Issue 9381010: Convert resources to take an instance key instead of an Instance*. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: USELESS PATCH TITLE Created 8 years, 10 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/websocket.h ('k') | ppapi/example/example.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/cpp/websocket.cc
diff --git a/ppapi/cpp/websocket.cc b/ppapi/cpp/websocket.cc
index 2a653707068ad20ecf4b8413d8015d6248062b1f..11c2aacfdc3a3c92dedd67a6b832961dfd229167 100644
--- a/ppapi/cpp/websocket.cc
+++ b/ppapi/cpp/websocket.cc
@@ -7,7 +7,7 @@
#include "ppapi/c/pp_errors.h"
#include "ppapi/c/pp_macros.h"
#include "ppapi/cpp/completion_callback.h"
-#include "ppapi/cpp/instance.h"
+#include "ppapi/cpp/instance_handle.h"
#include "ppapi/cpp/module.h"
#include "ppapi/cpp/module_impl.h"
#include "ppapi/cpp/var.h"
@@ -22,11 +22,11 @@ template <> const char* interface_name<PPB_WebSocket>() {
} // namespace
-WebSocket::WebSocket(Instance* instance) {
+WebSocket::WebSocket(const InstanceHandle& instance) {
if (!has_interface<PPB_WebSocket>())
return;
PassRefFromConstructor(get_interface<PPB_WebSocket>()->Create(
- instance->pp_instance()));
+ instance.pp_instance()));
}
WebSocket::~WebSocket() {
@@ -101,7 +101,7 @@ Var WebSocket::GetCloseReason() {
if (!has_interface<PPB_WebSocket>())
return 0;
- return Var(Var::PassRef(),
+ return Var(PASS_REF,
get_interface<PPB_WebSocket>()->GetCloseReason(pp_resource()));
}
@@ -118,16 +118,16 @@ Var WebSocket::GetExtensions() {
if (!has_interface<PPB_WebSocket>())
return Var();
- return Var(Var::PassRef(),
- get_interface<PPB_WebSocket>()->GetExtensions(pp_resource()));
+ return Var(PASS_REF,
+ get_interface<PPB_WebSocket>()->GetExtensions(pp_resource()));
}
Var WebSocket::GetProtocol() {
if (!has_interface<PPB_WebSocket>())
return Var();
- return Var(Var::PassRef(),
- get_interface<PPB_WebSocket>()->GetProtocol(pp_resource()));
+ return Var(PASS_REF,
+ get_interface<PPB_WebSocket>()->GetProtocol(pp_resource()));
}
PP_WebSocketReadyState WebSocket::GetReadyState() {
@@ -141,8 +141,8 @@ Var WebSocket::GetURL() {
if (!has_interface<PPB_WebSocket>())
return Var();
- return Var(Var::PassRef(),
- get_interface<PPB_WebSocket>()->GetURL(pp_resource()));
+ return Var(PASS_REF,
+ get_interface<PPB_WebSocket>()->GetURL(pp_resource()));
}
} // namespace pp
« no previous file with comments | « ppapi/cpp/websocket.h ('k') | ppapi/example/example.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698