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

Unified Diff: ppapi/shared_impl/host_resource.cc

Issue 10828023: PPAPI/NaCl: Make NaClIPCAdapter transfer handles more generally (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: re-add gyp files Created 8 years, 4 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/shared_impl/host_resource.h ('k') | ppapi/shared_impl/ppb_audio_shared.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/shared_impl/host_resource.cc
diff --git a/ppapi/shared_impl/host_resource.cc b/ppapi/shared_impl/host_resource.cc
new file mode 100644
index 0000000000000000000000000000000000000000..031a5f04aecd2701c9f7154067f7e7557560876f
--- /dev/null
+++ b/ppapi/shared_impl/host_resource.cc
@@ -0,0 +1,25 @@
+// 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/shared_impl/host_resource.h"
+
+namespace ppapi {
+
+HostResource::HostResource() : instance_(0), host_resource_(0) {
+}
+
+// static
+HostResource HostResource::MakeInstanceOnly(PP_Instance instance) {
+ HostResource resource;
+ resource.SetHostResource(instance, 0);
+ return resource;
+}
+
+void HostResource::SetHostResource(PP_Instance instance, PP_Resource resource) {
+ instance_ = instance;
+ host_resource_ = resource;
+}
+
+} // namespace ppapi
+
« no previous file with comments | « ppapi/shared_impl/host_resource.h ('k') | ppapi/shared_impl/ppb_audio_shared.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698