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

Unified Diff: ppapi/proxy/serialized_var.cc

Issue 6519057: Implement proxying for FileRef and FileChooser.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 10 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/proxy/serialized_var.cc
===================================================================
--- ppapi/proxy/serialized_var.cc (revision 74966)
+++ ppapi/proxy/serialized_var.cc (working copy)
@@ -273,6 +273,16 @@
return inner_->GetVar();
}
+// static
+PP_Var ReceiveSerializedVarReturnValue::Convert(
+ Dispatcher* dispatcher,
+ const SerializedVar& serialized) {
+ // Emulate how this is called when receiving a return value.
+ ReceiveSerializedVarReturnValue ret;
+ static_cast<SerializedVar&>(ret) = serialized;
piman 2011/02/17 21:25:07 How about adding an explicit constructor for Recei
+ return ret.Return(dispatcher);
+}
+
// ReceiveSerializedException --------------------------------------------------
ReceiveSerializedException::ReceiveSerializedException(Dispatcher* dispatcher,
@@ -421,6 +431,16 @@
serialized_->inner_->GetStringPtr()));
}
+// static
+SerializedVar SerializedVarReturnValue::Convert(Dispatcher* dispatcher,
+ const PP_Var& var) {
+ // Mimic what happens in the normal case.
+ SerializedVar result;
+ SerializedVarReturnValue retvalue(&result);
+ retvalue.Return(dispatcher, var);
+ return result;
+}
+
// SerializedVarOutParam -------------------------------------------------------
SerializedVarOutParam::SerializedVarOutParam(SerializedVar* serialized)

Powered by Google App Engine
This is Rietveld 408576698