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

Unified Diff: ppapi/proxy/ppapi_proxy_test.cc

Issue 10544089: Implement the file chooser as a new resource "host" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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/proxy/ppapi_proxy_test.h ('k') | ppapi/proxy/ppb_file_ref_proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/ppapi_proxy_test.cc
diff --git a/ppapi/proxy/ppapi_proxy_test.cc b/ppapi/proxy/ppapi_proxy_test.cc
index ac5b535ff88bf889651d05a3419927d3ab5ec48d..8083c75c4be0e275d1ae80512c265ba67c0e2d60 100644
--- a/ppapi/proxy/ppapi_proxy_test.cc
+++ b/ppapi/proxy/ppapi_proxy_test.cc
@@ -406,6 +406,56 @@ void TwoWayTest::TearDown() {
io_thread_.Stop();
}
+// ScopedPPResource -----------------------------------------------------------
+
+/*
+ScopedPPResource::ScopedPPResource() : resource_(0) {
+}
+
+ScopedPPResource::ScopedPPResource(PP_Resource r) : resource_(r) {
+}
+
+ScopedPPResource::ScopedPPResource(const ScopedPPResource& other)
+ : resource_(other.resource_) {
+ PpapiGlobals::Get()->GetResourceTracker()->AddRefResource(resource_);
+}
+
+ScopedPPResource::~ScopedPPResource() {
+ PpapiGlobals::Get()->GetResourceTracker()->ReleaseResource(resource_);
+}
+
+ScopedPPResource& ScopedPPResource::operator=(PP_Resource r) {
+ if (r)
+ PpapiGlobals::Get()->GetResourceTracker()->AddRefResource(r);
+ if (resource_)
+ PpapiGlobals::Get()->GetResourceTracker()->ReleaseResource(resource_);
+ resource_ = r;
+ return *this;
+}
+*/
+// ScopedPPVar ----------------------------------------------------------------
+
+ScopedPPVar::ScopedPPVar() : var_(PP_MakeUndefined()) {
+}
+
+ScopedPPVar::ScopedPPVar(const PP_Var& v) : var_(v) {
+}
+
+ScopedPPVar::ScopedPPVar(const ScopedPPVar& other)
+ : var_(other.var_) {
+ PpapiGlobals::Get()->GetVarTracker()->AddRefVar(var_);
+}
+
+ScopedPPVar::~ScopedPPVar() {
+ PpapiGlobals::Get()->GetVarTracker()->ReleaseVar(var_);
+}
+
+ScopedPPVar& ScopedPPVar::operator=(const PP_Var& v) {
+ PpapiGlobals::Get()->GetVarTracker()->AddRefVar(v);
+ PpapiGlobals::Get()->GetVarTracker()->ReleaseVar(var_);
+ var_ = v;
+ return *this;
+}
} // namespace proxy
} // namespace ppapi
« no previous file with comments | « ppapi/proxy/ppapi_proxy_test.h ('k') | ppapi/proxy/ppb_file_ref_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698