| 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 "content/renderer/pepper/pepper_in_process_resource_creation.h" | 5 #include "content/renderer/pepper/pepper_in_process_resource_creation.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/memory/weak_ptr.h" | 8 #include "base/memory/weak_ptr.h" |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "content/renderer/render_view_impl.h" | 10 #include "content/renderer/render_view_impl.h" |
| 11 #include "content/renderer/pepper/pepper_in_process_router.h" | 11 #include "content/renderer/pepper/pepper_in_process_router.h" |
| 12 #include "content/renderer/pepper/renderer_ppapi_host_impl.h" | 12 #include "content/renderer/pepper/renderer_ppapi_host_impl.h" |
| 13 #include "ipc/ipc_message.h" | 13 #include "ipc/ipc_message.h" |
| 14 #include "ipc/ipc_message_macros.h" | 14 #include "ipc/ipc_message_macros.h" |
| 15 #include "ppapi/host/ppapi_host.h" | 15 #include "ppapi/host/ppapi_host.h" |
| 16 #include "ppapi/proxy/browser_font_resource_trusted.h" | 16 #include "ppapi/proxy/browser_font_resource_trusted.h" |
| 17 #include "ppapi/proxy/file_chooser_resource.h" | 17 #include "ppapi/proxy/file_chooser_resource.h" |
| 18 #include "ppapi/proxy/file_io_resource.h" |
| 18 #include "ppapi/proxy/graphics_2d_resource.h" | 19 #include "ppapi/proxy/graphics_2d_resource.h" |
| 19 #include "ppapi/proxy/ppapi_messages.h" | 20 #include "ppapi/proxy/ppapi_messages.h" |
| 20 #include "ppapi/proxy/printing_resource.h" | 21 #include "ppapi/proxy/printing_resource.h" |
| 21 #include "ppapi/proxy/url_request_info_resource.h" | 22 #include "ppapi/proxy/url_request_info_resource.h" |
| 22 #include "ppapi/proxy/url_response_info_resource.h" | 23 #include "ppapi/proxy/url_response_info_resource.h" |
| 23 #include "ppapi/proxy/websocket_resource.h" | 24 #include "ppapi/proxy/websocket_resource.h" |
| 24 #include "ppapi/shared_impl/ppapi_globals.h" | 25 #include "ppapi/shared_impl/ppapi_globals.h" |
| 25 #include "ppapi/shared_impl/ppapi_permissions.h" | 26 #include "ppapi/shared_impl/ppapi_permissions.h" |
| 26 #include "ppapi/shared_impl/resource_tracker.h" | 27 #include "ppapi/shared_impl/resource_tracker.h" |
| 27 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" | 28 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 | 62 |
| 62 PP_Resource PepperInProcessResourceCreation::CreateFileChooser( | 63 PP_Resource PepperInProcessResourceCreation::CreateFileChooser( |
| 63 PP_Instance instance, | 64 PP_Instance instance, |
| 64 PP_FileChooserMode_Dev mode, | 65 PP_FileChooserMode_Dev mode, |
| 65 const char* accept_types) { | 66 const char* accept_types) { |
| 66 return (new ppapi::proxy::FileChooserResource( | 67 return (new ppapi::proxy::FileChooserResource( |
| 67 host_impl_->in_process_router()->GetPluginConnection(), | 68 host_impl_->in_process_router()->GetPluginConnection(), |
| 68 instance, mode, accept_types))->GetReference(); | 69 instance, mode, accept_types))->GetReference(); |
| 69 } | 70 } |
| 70 | 71 |
| 72 PP_Resource PepperInProcessResourceCreation::CreateFileIO( |
| 73 PP_Instance instance) { |
| 74 return (new ppapi::proxy::FileIOResource( |
| 75 host_impl_->in_process_router()->GetPluginConnection(), |
| 76 instance))->GetReference(); |
| 77 } |
| 78 |
| 71 PP_Resource PepperInProcessResourceCreation::CreateGraphics2D( | 79 PP_Resource PepperInProcessResourceCreation::CreateGraphics2D( |
| 72 PP_Instance instance, | 80 PP_Instance instance, |
| 73 const PP_Size& size, | 81 const PP_Size& size, |
| 74 PP_Bool is_always_opaque) { | 82 PP_Bool is_always_opaque) { |
| 75 return (new ppapi::proxy::Graphics2DResource( | 83 return (new ppapi::proxy::Graphics2DResource( |
| 76 host_impl_->in_process_router()->GetPluginConnection(), | 84 host_impl_->in_process_router()->GetPluginConnection(), |
| 77 instance, size, is_always_opaque))->GetReference(); | 85 instance, size, is_always_opaque))->GetReference(); |
| 78 } | 86 } |
| 79 | 87 |
| 80 PP_Resource PepperInProcessResourceCreation::CreatePrinting( | 88 PP_Resource PepperInProcessResourceCreation::CreatePrinting( |
| (...skipping 21 matching lines...) Expand all Loading... |
| 102 } | 110 } |
| 103 | 111 |
| 104 PP_Resource PepperInProcessResourceCreation::CreateWebSocket( | 112 PP_Resource PepperInProcessResourceCreation::CreateWebSocket( |
| 105 PP_Instance instance) { | 113 PP_Instance instance) { |
| 106 return (new ppapi::proxy::WebSocketResource( | 114 return (new ppapi::proxy::WebSocketResource( |
| 107 host_impl_->in_process_router()->GetPluginConnection(), | 115 host_impl_->in_process_router()->GetPluginConnection(), |
| 108 instance))->GetReference(); | 116 instance))->GetReference(); |
| 109 } | 117 } |
| 110 | 118 |
| 111 } // namespace content | 119 } // namespace content |
| OLD | NEW |