| 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" | |
| 14 #include "ppapi/proxy/file_chooser_resource.h" | 13 #include "ppapi/proxy/file_chooser_resource.h" |
| 15 #include "ppapi/proxy/file_io_resource.h" | 14 #include "ppapi/proxy/file_io_resource.h" |
| 16 #include "ppapi/proxy/file_system_resource.h" | 15 #include "ppapi/proxy/file_system_resource.h" |
| 17 #include "ppapi/proxy/flash_device_id_resource.h" | 16 #include "ppapi/proxy/flash_device_id_resource.h" |
| 18 #include "ppapi/proxy/flash_font_file_resource.h" | 17 #include "ppapi/proxy/flash_font_file_resource.h" |
| 19 #include "ppapi/proxy/flash_menu_resource.h" | 18 #include "ppapi/proxy/flash_menu_resource.h" |
| 20 #include "ppapi/proxy/graphics_2d_resource.h" | 19 #include "ppapi/proxy/graphics_2d_resource.h" |
| 21 #include "ppapi/proxy/host_resolver_private_resource.h" | 20 #include "ppapi/proxy/host_resolver_private_resource.h" |
| 22 #include "ppapi/proxy/plugin_dispatcher.h" | 21 #include "ppapi/proxy/plugin_dispatcher.h" |
| 23 #include "ppapi/proxy/plugin_globals.h" | 22 #include "ppapi/proxy/plugin_globals.h" |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 } | 62 } |
| 64 | 63 |
| 65 ResourceCreationProxy::~ResourceCreationProxy() { | 64 ResourceCreationProxy::~ResourceCreationProxy() { |
| 66 } | 65 } |
| 67 | 66 |
| 68 // static | 67 // static |
| 69 InterfaceProxy* ResourceCreationProxy::Create(Dispatcher* dispatcher) { | 68 InterfaceProxy* ResourceCreationProxy::Create(Dispatcher* dispatcher) { |
| 70 return new ResourceCreationProxy(dispatcher); | 69 return new ResourceCreationProxy(dispatcher); |
| 71 } | 70 } |
| 72 | 71 |
| 73 PP_Resource ResourceCreationProxy::CreateDirectoryReader( | |
| 74 PP_Instance instance, | |
| 75 PP_Resource directory_ref) { | |
| 76 return (new DirectoryReaderResource( | |
| 77 GetConnection(), instance, directory_ref))->GetReference(); | |
| 78 } | |
| 79 | |
| 80 PP_Resource ResourceCreationProxy::CreateFileIO(PP_Instance instance) { | 72 PP_Resource ResourceCreationProxy::CreateFileIO(PP_Instance instance) { |
| 81 return (new FileIOResource(GetConnection(), instance))->GetReference(); | 73 return (new FileIOResource(GetConnection(), instance))->GetReference(); |
| 82 } | 74 } |
| 83 | 75 |
| 84 PP_Resource ResourceCreationProxy::CreateFileRef(PP_Instance instance, | 76 PP_Resource ResourceCreationProxy::CreateFileRef(PP_Instance instance, |
| 85 PP_Resource file_system, | 77 PP_Resource file_system, |
| 86 const char* path) { | 78 const char* path) { |
| 87 return PPB_FileRef_Proxy::CreateProxyResource(instance, file_system, path); | 79 return PPB_FileRef_Proxy::CreateProxyResource(instance, file_system, path); |
| 88 } | 80 } |
| 89 | 81 |
| (...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 399 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) { | 391 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) { |
| 400 return false; | 392 return false; |
| 401 } | 393 } |
| 402 | 394 |
| 403 Connection ResourceCreationProxy::GetConnection() { | 395 Connection ResourceCreationProxy::GetConnection() { |
| 404 return Connection(PluginGlobals::Get()->GetBrowserSender(), dispatcher()); | 396 return Connection(PluginGlobals::Get()->GetBrowserSender(), dispatcher()); |
| 405 } | 397 } |
| 406 | 398 |
| 407 } // namespace proxy | 399 } // namespace proxy |
| 408 } // namespace ppapi | 400 } // namespace ppapi |
| OLD | NEW |