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

Unified Diff: ppapi/shared_impl/var.h

Issue 8826011: Remove PP_Module from parameters for PPB_Var.VarFromUtf8. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 9 years 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/private/net_address_private_impl.cc ('k') | ppapi/shared_impl/var.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/shared_impl/var.h
diff --git a/ppapi/shared_impl/var.h b/ppapi/shared_impl/var.h
index ceb72716cb929494c8ee979b0e3b5c56f8e852df..988898a0b4c17476a5256479ac2da9da6c22b8e2 100644
--- a/ppapi/shared_impl/var.h
+++ b/ppapi/shared_impl/var.h
@@ -9,7 +9,6 @@
#include "base/compiler_specific.h"
#include "base/memory/ref_counted.h"
-#include "ppapi/c/pp_module.h"
#include "ppapi/c/pp_var.h"
#include "ppapi/shared_impl/ppapi_shared_export.h"
@@ -21,9 +20,7 @@ class StringVar;
// Var -------------------------------------------------------------------------
-// Represents a non-POD var. This is derived from a resource even though it
-// isn't a resource from the plugin's perspective. This allows us to re-use
-// the refcounting and the association with the module from the resource code.
+// Represents a non-POD var.
class PPAPI_SHARED_EXPORT Var : public base::RefCounted<Var> {
public:
virtual ~Var();
@@ -50,11 +47,8 @@ class PPAPI_SHARED_EXPORT Var : public base::RefCounted<Var> {
// the plugin.
int32 GetExistingVarID() const;
- PP_Module pp_module() const { return pp_module_; }
-
protected:
- // This can only be constructed as a StringVar or an ObjectVar.
- explicit Var(PP_Module module);
+ Var();
// Returns the unique ID associated with this string or object, creating it
// if necessary. The return value will be 0 if the string or object is
@@ -69,8 +63,6 @@ class PPAPI_SHARED_EXPORT Var : public base::RefCounted<Var> {
void AssignVarID(int32 id);
private:
- PP_Module pp_module_;
-
// This will be 0 if no ID has been assigned (this happens lazily).
int32 var_id_;
@@ -82,7 +74,7 @@ class PPAPI_SHARED_EXPORT Var : public base::RefCounted<Var> {
// Represents a string-based Var.
//
// Returning a given string as a PP_Var:
-// return StringVar::StringToPPVar(module, my_string);
+// return StringVar::StringToPPVar(my_string);
//
// Converting a PP_Var to a string:
// StringVar* string = StringVar::FromPPVar(var);
@@ -91,8 +83,8 @@ class PPAPI_SHARED_EXPORT Var : public base::RefCounted<Var> {
// DoSomethingWithTheString(string->value());
class PPAPI_SHARED_EXPORT StringVar : public Var {
public:
- StringVar(PP_Module module, const std::string& str);
- StringVar(PP_Module module, const char* str, uint32 len);
+ StringVar(const std::string& str);
+ StringVar(const char* str, uint32 len);
virtual ~StringVar();
const std::string& value() const { return value_; }
@@ -107,10 +99,9 @@ class PPAPI_SHARED_EXPORT StringVar : public Var {
// is not valid UTF-8, a NULL var will be returned.
//
// The return value will have a reference count of 1. Internally, this will
- // create a StringVar, associate it with a module, and return the reference
- // to it in the var.
- static PP_Var StringToPPVar(PP_Module module, const std::string& str);
- static PP_Var StringToPPVar(PP_Module module, const char* str, uint32 len);
+ // create a StringVar and return the reference to it in the var.
+ static PP_Var StringToPPVar(const std::string& str);
+ static PP_Var StringToPPVar(const char* str, uint32 len);
// Helper function that converts a PP_Var to a string. This will return NULL
// if the PP_Var is not of string type or the string is invalid.
« no previous file with comments | « ppapi/shared_impl/private/net_address_private_impl.cc ('k') | ppapi/shared_impl/var.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698