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

Side by Side Diff: ppapi/proxy/ppb_file_ref_proxy.cc

Issue 10544089: Implement the file chooser as a new resource "host" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ppapi/proxy/ppb_file_ref_proxy.h ('k') | ppapi/proxy/resource_creation_proxy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ppapi/proxy/ppb_file_ref_proxy.h" 5 #include "ppapi/proxy/ppb_file_ref_proxy.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "ppapi/c/pp_errors.h" 10 #include "ppapi/c/pp_errors.h"
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBFileRef_GetAbsolutePath, 227 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBFileRef_GetAbsolutePath,
228 OnMsgGetAbsolutePath) 228 OnMsgGetAbsolutePath)
229 229
230 IPC_MESSAGE_HANDLER(PpapiMsg_PPBFileRef_CallbackComplete, 230 IPC_MESSAGE_HANDLER(PpapiMsg_PPBFileRef_CallbackComplete,
231 OnMsgCallbackComplete) 231 OnMsgCallbackComplete)
232 IPC_MESSAGE_UNHANDLED(handled = false) 232 IPC_MESSAGE_UNHANDLED(handled = false)
233 IPC_END_MESSAGE_MAP() 233 IPC_END_MESSAGE_MAP()
234 return handled; 234 return handled;
235 } 235 }
236 236
237 // static
237 void PPB_FileRef_Proxy::SerializeFileRef(PP_Resource file_ref, 238 void PPB_FileRef_Proxy::SerializeFileRef(PP_Resource file_ref,
238 PPB_FileRef_CreateInfo* result) { 239 PPB_FileRef_CreateInfo* result) {
239 EnterResourceNoLock<PPB_FileRef_API> enter(file_ref, false); 240 EnterResourceNoLock<PPB_FileRef_API> enter(file_ref, false);
240 if (enter.succeeded()) 241 if (enter.succeeded())
241 *result = enter.object()->GetCreateInfo(); 242 *result = enter.object()->GetCreateInfo();
242 } 243 }
243 244
244 // static 245 // static
245 PP_Resource PPB_FileRef_Proxy::DeserializeFileRef( 246 PP_Resource PPB_FileRef_Proxy::DeserializeFileRef(
246 const PPB_FileRef_CreateInfo& serialized) { 247 const PPB_FileRef_CreateInfo& serialized) {
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 int32_t result, 337 int32_t result,
337 const HostResource& host_resource, 338 const HostResource& host_resource,
338 int callback_id) { 339 int callback_id) {
339 // Execute OnMsgCallbackComplete in the plugin process. 340 // Execute OnMsgCallbackComplete in the plugin process.
340 Send(new PpapiMsg_PPBFileRef_CallbackComplete( 341 Send(new PpapiMsg_PPBFileRef_CallbackComplete(
341 API_ID_PPB_FILE_REF, host_resource, callback_id, result)); 342 API_ID_PPB_FILE_REF, host_resource, callback_id, result));
342 } 343 }
343 344
344 } // namespace proxy 345 } // namespace proxy
345 } // namespace ppapi 346 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/proxy/ppb_file_ref_proxy.h ('k') | ppapi/proxy/resource_creation_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698