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

Unified Diff: ppapi/shared_impl/resource_var.cc

Issue 23346009: [PPAPI] Added a new Var subclass, ResourceVar. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Added constructor that takes IPC::Message. Created 7 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
Index: ppapi/shared_impl/resource_var.cc
diff --git a/ppapi/shared_impl/resource_var.cc b/ppapi/shared_impl/resource_var.cc
new file mode 100644
index 0000000000000000000000000000000000000000..3c9045185c129563228a8fcea0a6862dba03a6b5
--- /dev/null
+++ b/ppapi/shared_impl/resource_var.cc
@@ -0,0 +1,35 @@
+// Copyright 2013 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/resource_var.h"
+
+namespace ppapi {
+
+ResourceVar::ResourceVar() : resource_id_(0) {}
+
+ResourceVar::ResourceVar(PP_Resource resource_id) : resource_id_(resource_id) {}
+
+ResourceVar::ResourceVar(const IPC::Message& creation_message)
+ : creation_message_(creation_message) {}
yzshen1 2013/08/28 17:31:58 You should also init resource_id_.
Matt Giuca 2013/08/29 01:44:47 Done.
+
+ResourceVar::~ResourceVar() {}
+
+ResourceVar* ResourceVar::AsResourceVar() {
+ return this;
+}
+
+PP_VarType ResourceVar::GetType() const {
+ // TODO(mgiuca): Return PP_VARTYPE_RESOURCE, once that is a valid enum value.
+ NOTREACHED();
+ return PP_VARTYPE_UNDEFINED;
+}
+
+// static
+ResourceVar* ResourceVar::FromPPVar(PP_Var var) {
+ // TODO(mgiuca): Implement this function, once PP_VARTYPE_RESOURCE is
+ // introduced.
+ return NULL;
+}
+
+} // namespace ppapi

Powered by Google App Engine
This is Rietveld 408576698