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

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

Issue 11958033: Implement Pepper proxy for PPB_DirectoryReader (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix DirectoryReader creation thunk (crbug/171539) Created 7 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 unified diff | Download patch | Annotate | Revision Log
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/resource_creation_proxy.h" 5 #include "ppapi/proxy/resource_creation_proxy.h"
6 6
7 #include "ppapi/c/pp_errors.h" 7 #include "ppapi/c/pp_errors.h"
8 #include "ppapi/c/pp_size.h" 8 #include "ppapi/c/pp_size.h"
9 #include "ppapi/c/trusted/ppb_image_data_trusted.h" 9 #include "ppapi/c/trusted/ppb_image_data_trusted.h"
10 #include "ppapi/proxy/audio_input_resource.h" 10 #include "ppapi/proxy/audio_input_resource.h"
11 #include "ppapi/proxy/browser_font_resource_trusted.h" 11 #include "ppapi/proxy/browser_font_resource_trusted.h"
12 #include "ppapi/proxy/connection.h" 12 #include "ppapi/proxy/connection.h"
13 #include "ppapi/proxy/directory_reader_resource.h"
13 #include "ppapi/proxy/file_chooser_resource.h" 14 #include "ppapi/proxy/file_chooser_resource.h"
14 #include "ppapi/proxy/file_io_resource.h" 15 #include "ppapi/proxy/file_io_resource.h"
15 #include "ppapi/proxy/flash_device_id_resource.h" 16 #include "ppapi/proxy/flash_device_id_resource.h"
16 #include "ppapi/proxy/flash_font_file_resource.h" 17 #include "ppapi/proxy/flash_font_file_resource.h"
17 #include "ppapi/proxy/flash_menu_resource.h" 18 #include "ppapi/proxy/flash_menu_resource.h"
18 #include "ppapi/proxy/graphics_2d_resource.h" 19 #include "ppapi/proxy/graphics_2d_resource.h"
19 #include "ppapi/proxy/plugin_dispatcher.h" 20 #include "ppapi/proxy/plugin_dispatcher.h"
20 #include "ppapi/proxy/plugin_globals.h" 21 #include "ppapi/proxy/plugin_globals.h"
21 #include "ppapi/proxy/plugin_resource_tracker.h" 22 #include "ppapi/proxy/plugin_resource_tracker.h"
22 #include "ppapi/proxy/ppapi_messages.h" 23 #include "ppapi/proxy/ppapi_messages.h"
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 *description, dispatcher->preferences()))->GetReference(); 312 *description, dispatcher->preferences()))->GetReference();
312 } 313 }
313 314
314 PP_Resource ResourceCreationProxy::CreateBuffer(PP_Instance instance, 315 PP_Resource ResourceCreationProxy::CreateBuffer(PP_Instance instance,
315 uint32_t size) { 316 uint32_t size) {
316 return PPB_Buffer_Proxy::CreateProxyResource(instance, size); 317 return PPB_Buffer_Proxy::CreateProxyResource(instance, size);
317 } 318 }
318 319
319 PP_Resource ResourceCreationProxy::CreateDirectoryReader( 320 PP_Resource ResourceCreationProxy::CreateDirectoryReader(
320 PP_Resource directory_ref) { 321 PP_Resource directory_ref) {
321 NOTIMPLEMENTED(); // Not proxied yet. 322 Resource* object =
322 return 0; 323 PpapiGlobals::Get()->GetResourceTracker()->GetResource(directory_ref);
324 return (new DirectoryReaderResource(
325 GetConnection(), object->pp_instance(), directory_ref))->GetReference();
323 } 326 }
324 327
325 PP_Resource ResourceCreationProxy::CreateFlashDeviceID(PP_Instance instance) { 328 PP_Resource ResourceCreationProxy::CreateFlashDeviceID(PP_Instance instance) {
326 return (new FlashDeviceIDResource(GetConnection(), instance))->GetReference(); 329 return (new FlashDeviceIDResource(GetConnection(), instance))->GetReference();
327 } 330 }
328 331
329 PP_Resource ResourceCreationProxy::CreateFlashFontFile( 332 PP_Resource ResourceCreationProxy::CreateFlashFontFile(
330 PP_Instance instance, 333 PP_Instance instance,
331 const PP_BrowserFont_Trusted_Description* description, 334 const PP_BrowserFont_Trusted_Description* description,
332 PP_PrivateFontCharset charset) { 335 PP_PrivateFontCharset charset) {
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) { 387 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) {
385 return false; 388 return false;
386 } 389 }
387 390
388 Connection ResourceCreationProxy::GetConnection() { 391 Connection ResourceCreationProxy::GetConnection() {
389 return Connection(PluginGlobals::Get()->GetBrowserSender(), dispatcher()); 392 return Connection(PluginGlobals::Get()->GetBrowserSender(), dispatcher());
390 } 393 }
391 394
392 } // namespace proxy 395 } // namespace proxy
393 } // namespace ppapi 396 } // namespace ppapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698