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

Unified Diff: ppapi/proxy/file_chooser_resource.cc

Issue 21966004: Pepper: Move FileRef to the "new" resource proxy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: CreateInfo/DetailedInfo rename 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/proxy/file_chooser_resource.cc
diff --git a/ppapi/proxy/file_chooser_resource.cc b/ppapi/proxy/file_chooser_resource.cc
index ebd545cfc385a806a5c5330f6f1194bf45fd3d63..9847e295c9cf336770172daa1140027276c28935 100644
--- a/ppapi/proxy/file_chooser_resource.cc
+++ b/ppapi/proxy/file_chooser_resource.cc
@@ -9,8 +9,8 @@
#include "ipc/ipc_message.h"
#include "ppapi/c/pp_errors.h"
#include "ppapi/proxy/dispatch_reply_message.h"
+#include "ppapi/proxy/file_ref_resource.h"
#include "ppapi/proxy/ppapi_messages.h"
-#include "ppapi/proxy/ppb_file_ref_proxy.h"
#include "ppapi/shared_impl/var.h"
namespace ppapi {
@@ -100,19 +100,25 @@ void FileChooserResource::PopulateAcceptTypes(
void FileChooserResource::OnPluginMsgShowReply(
const ResourceMessageReplyParams& params,
- const std::vector<PPB_FileRef_CreateInfo>& chosen_files) {
+ const std::vector<FileRefCreateInfo>& chosen_files) {
if (output_.is_valid()) {
// Using v0.6 of the API with the output array.
std::vector<PP_Resource> files;
- for (size_t i = 0; i < chosen_files.size(); i++)
- files.push_back(PPB_FileRef_Proxy::DeserializeFileRef(chosen_files[i]));
+ for (size_t i = 0; i < chosen_files.size(); i++) {
+ files.push_back(FileRefResource::CreateFileRef(
+ connection(),
+ pp_instance(),
+ chosen_files[i]));
+ }
output_.StoreResourceVector(files);
} else {
// Convert each of the passed in file infos to resources. These will be
// owned by the FileChooser object until they're passed to the plugin.
DCHECK(file_queue_.empty());
for (size_t i = 0; i < chosen_files.size(); i++) {
- file_queue_.push(PPB_FileRef_Proxy::DeserializeFileRef(
+ file_queue_.push(FileRefResource::CreateFileRef(
+ connection(),
+ pp_instance(),
chosen_files[i]));
}
}

Powered by Google App Engine
This is Rietveld 408576698