| OLD | NEW |
| 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/directory_reader_resource.h" |
| 14 #include "ppapi/proxy/ext_crx_file_system_private_resource.h" |
| 14 #include "ppapi/proxy/file_chooser_resource.h" | 15 #include "ppapi/proxy/file_chooser_resource.h" |
| 15 #include "ppapi/proxy/file_io_resource.h" | 16 #include "ppapi/proxy/file_io_resource.h" |
| 16 #include "ppapi/proxy/file_system_resource.h" | 17 #include "ppapi/proxy/file_system_resource.h" |
| 17 #include "ppapi/proxy/flash_device_id_resource.h" | 18 #include "ppapi/proxy/flash_device_id_resource.h" |
| 18 #include "ppapi/proxy/flash_font_file_resource.h" | 19 #include "ppapi/proxy/flash_font_file_resource.h" |
| 19 #include "ppapi/proxy/flash_menu_resource.h" | 20 #include "ppapi/proxy/flash_menu_resource.h" |
| 20 #include "ppapi/proxy/graphics_2d_resource.h" | 21 #include "ppapi/proxy/graphics_2d_resource.h" |
| 21 #include "ppapi/proxy/host_resolver_private_resource.h" | 22 #include "ppapi/proxy/host_resolver_private_resource.h" |
| 22 #include "ppapi/proxy/plugin_dispatcher.h" | 23 #include "ppapi/proxy/plugin_dispatcher.h" |
| 23 #include "ppapi/proxy/plugin_globals.h" | 24 #include "ppapi/proxy/plugin_globals.h" |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 return new ResourceCreationProxy(dispatcher); | 71 return new ResourceCreationProxy(dispatcher); |
| 71 } | 72 } |
| 72 | 73 |
| 73 PP_Resource ResourceCreationProxy::CreateDirectoryReader( | 74 PP_Resource ResourceCreationProxy::CreateDirectoryReader( |
| 74 PP_Instance instance, | 75 PP_Instance instance, |
| 75 PP_Resource directory_ref) { | 76 PP_Resource directory_ref) { |
| 76 return (new DirectoryReaderResource( | 77 return (new DirectoryReaderResource( |
| 77 GetConnection(), instance, directory_ref))->GetReference(); | 78 GetConnection(), instance, directory_ref))->GetReference(); |
| 78 } | 79 } |
| 79 | 80 |
| 81 PP_Resource ResourceCreationProxy::CreateExtCrxFileSystemPrivate( |
| 82 PP_Instance instance) { |
| 83 return (new ExtCrxFileSystemPrivateResource(GetConnection(), |
| 84 instance))->GetReference(); |
| 85 } |
| 86 |
| 80 PP_Resource ResourceCreationProxy::CreateFileIO(PP_Instance instance) { | 87 PP_Resource ResourceCreationProxy::CreateFileIO(PP_Instance instance) { |
| 81 return (new FileIOResource(GetConnection(), instance))->GetReference(); | 88 return (new FileIOResource(GetConnection(), instance))->GetReference(); |
| 82 } | 89 } |
| 83 | 90 |
| 84 PP_Resource ResourceCreationProxy::CreateFileRef(PP_Instance instance, | 91 PP_Resource ResourceCreationProxy::CreateFileRef(PP_Instance instance, |
| 85 PP_Resource file_system, | 92 PP_Resource file_system, |
| 86 const char* path) { | 93 const char* path) { |
| 87 return PPB_FileRef_Proxy::CreateProxyResource(instance, file_system, path); | 94 return PPB_FileRef_Proxy::CreateProxyResource(instance, file_system, path); |
| 88 } | 95 } |
| 89 | 96 |
| (...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 399 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) { | 406 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) { |
| 400 return false; | 407 return false; |
| 401 } | 408 } |
| 402 | 409 |
| 403 Connection ResourceCreationProxy::GetConnection() { | 410 Connection ResourceCreationProxy::GetConnection() { |
| 404 return Connection(PluginGlobals::Get()->GetBrowserSender(), dispatcher()); | 411 return Connection(PluginGlobals::Get()->GetBrowserSender(), dispatcher()); |
| 405 } | 412 } |
| 406 | 413 |
| 407 } // namespace proxy | 414 } // namespace proxy |
| 408 } // namespace ppapi | 415 } // namespace ppapi |
| OLD | NEW |