diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-07 05:38:00 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-07 05:38:00 +0000 |
commit | 2d449b31b71c259f63dbf4b7a28ee297531b721a (patch) | |
tree | 91564c036afe5a22e6ab4414d2a948decec28542 /ppapi/proxy/serialized_var.h | |
parent | f4f1be5d33972f2bd04dc6a295aaeaee6c96e94c (diff) | |
download | chromium_src-2d449b31b71c259f63dbf4b7a28ee297531b721a.zip chromium_src-2d449b31b71c259f63dbf4b7a28ee297531b721a.tar.gz chromium_src-2d449b31b71c259f63dbf4b7a28ee297531b721a.tar.bz2 |
Remove special handling for strings in var serialization.
Previously we had to have a lot of weird string handling because strings needed a PP_Module to be constructed, and because they had different methods for being created in the host and the plugin processes. We've removed all of these limitations, so now we can just delete the whole mess.
Review URL: https://chromiumcodereview.appspot.com/9316123
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@120724 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/proxy/serialized_var.h')
-rw-r--r-- | ppapi/proxy/serialized_var.h | 34 |
1 files changed, 4 insertions, 30 deletions
diff --git a/ppapi/proxy/serialized_var.h b/ppapi/proxy/serialized_var.h index 1ad218d..28b7c8b 100644 --- a/ppapi/proxy/serialized_var.h +++ b/ppapi/proxy/serialized_var.h @@ -99,21 +99,11 @@ class PPAPI_PROXY_EXPORT SerializedVar { // See outer class's declarations above. PP_Var GetVar() const; - PP_Var GetIncompleteVar() const; void SetVar(PP_Var var); - void SetString(scoped_ptr<std::string> str); - // Return a new string with the contents of the string referenced by Inner. - // The string referenced by the Inner will be empty after this. - scoped_ptr<std::string> GetStringDestructive(); - // Return a pointer to our internal string pointer. This is so that the - // caller will be able to make this Inner point to a string that's owned - // elsewhere (i.e., in the tracker). - const std::string** GetStringPtrPtr(); - - // For the SerializedVarTestConstructor, this writes the Var value as if - // it was just received off the wire, without any serialization rules. +
+ // For the SerializedVarTestConstructor, this writes the Var value as if
+ // it was just received off the wire, without any serialization rules.
void ForceSetVarValueForTest(PP_Var value); - void ForceSetStringValueForTest(const std::string& str); void WriteToMessage(IPC::Message* m) const; bool ReadFromMessage(const IPC::Message* m, void** iter); @@ -152,18 +142,6 @@ class PPAPI_PROXY_EXPORT SerializedVar { // a string ID. Before this, the as_id will be 0 for VARTYPE_STRING. PP_Var var_; - // If valid, this is a pointer to a string owned by the VarTracker. When our - // outer SerializedVar gets serialized, it will write the string directly - // from the tracker so we do not need to make any unnecessary copies. This - // should only be valid on the sender side. - const std::string* tracker_string_ptr_; - - // If valid, this is a string received from IPC which needs to be inserted - // in to the var tracker. When we provide it to the tracker, we pass - // ownership so that there are no unnecessary copies. This should only ever - // be valid on the receiver side. - scoped_ptr<std::string> string_from_ipc_; - CleanupMode cleanup_mode_; // The dispatcher saved for the call to EndSendPassRef for the cleanup. @@ -464,11 +442,7 @@ class PPAPI_PROXY_EXPORT SerializedVarTestReader : public SerializedVar { // The "incomplete" var is the one sent over the wire. Strings and object // IDs have not yet been converted, so this is the thing that tests will // actually want to check. - PP_Var GetIncompleteVar() const { return inner_->GetIncompleteVar(); } - - const std::string* GetTrackerStringPtr() const { - return *inner_->GetStringPtrPtr(); - } + PP_Var GetVar() const { return inner_->GetVar(); } }; } // namespace proxy |