| 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/proxy/audio_input_resource.h" | 9 #include "ppapi/proxy/audio_input_resource.h" |
| 10 #include "ppapi/proxy/connection.h" | 10 #include "ppapi/proxy/connection.h" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 #include "ppapi/proxy/url_response_info_resource.h" | 47 #include "ppapi/proxy/url_response_info_resource.h" |
| 48 #include "ppapi/proxy/video_capture_resource.h" | 48 #include "ppapi/proxy/video_capture_resource.h" |
| 49 #include "ppapi/proxy/video_destination_resource.h" | 49 #include "ppapi/proxy/video_destination_resource.h" |
| 50 #include "ppapi/proxy/video_source_resource.h" | 50 #include "ppapi/proxy/video_source_resource.h" |
| 51 #include "ppapi/proxy/websocket_resource.h" | 51 #include "ppapi/proxy/websocket_resource.h" |
| 52 #include "ppapi/shared_impl/api_id.h" | 52 #include "ppapi/shared_impl/api_id.h" |
| 53 #include "ppapi/shared_impl/host_resource.h" | 53 #include "ppapi/shared_impl/host_resource.h" |
| 54 #include "ppapi/shared_impl/ppb_audio_config_shared.h" | 54 #include "ppapi/shared_impl/ppb_audio_config_shared.h" |
| 55 #include "ppapi/shared_impl/ppb_audio_shared.h" | 55 #include "ppapi/shared_impl/ppb_audio_shared.h" |
| 56 #include "ppapi/shared_impl/ppb_input_event_shared.h" | 56 #include "ppapi/shared_impl/ppb_input_event_shared.h" |
| 57 #include "ppapi/shared_impl/ppb_resource_array_shared.h" | |
| 58 #include "ppapi/shared_impl/var.h" | 57 #include "ppapi/shared_impl/var.h" |
| 59 #include "ppapi/thunk/enter.h" | 58 #include "ppapi/thunk/enter.h" |
| 60 #include "ppapi/thunk/ppb_image_data_api.h" | 59 #include "ppapi/thunk/ppb_image_data_api.h" |
| 61 | 60 |
| 62 using ppapi::thunk::ResourceCreationAPI; | 61 using ppapi::thunk::ResourceCreationAPI; |
| 63 | 62 |
| 64 namespace ppapi { | 63 namespace ppapi { |
| 65 namespace proxy { | 64 namespace proxy { |
| 66 | 65 |
| 67 ResourceCreationProxy::ResourceCreationProxy(Dispatcher* dispatcher) | 66 ResourceCreationProxy::ResourceCreationProxy(Dispatcher* dispatcher) |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 | 135 |
| 137 PP_Resource ResourceCreationProxy::CreateTouchInputEvent( | 136 PP_Resource ResourceCreationProxy::CreateTouchInputEvent( |
| 138 PP_Instance instance, | 137 PP_Instance instance, |
| 139 PP_InputEvent_Type type, | 138 PP_InputEvent_Type type, |
| 140 PP_TimeTicks time_stamp, | 139 PP_TimeTicks time_stamp, |
| 141 uint32_t modifiers) { | 140 uint32_t modifiers) { |
| 142 return PPB_InputEvent_Shared::CreateTouchInputEvent( | 141 return PPB_InputEvent_Shared::CreateTouchInputEvent( |
| 143 OBJECT_IS_PROXY, instance, type, time_stamp, modifiers); | 142 OBJECT_IS_PROXY, instance, type, time_stamp, modifiers); |
| 144 } | 143 } |
| 145 | 144 |
| 146 PP_Resource ResourceCreationProxy::CreateResourceArray( | |
| 147 PP_Instance instance, | |
| 148 const PP_Resource elements[], | |
| 149 uint32_t size) { | |
| 150 PPB_ResourceArray_Shared* object = new PPB_ResourceArray_Shared( | |
| 151 OBJECT_IS_PROXY, instance, elements, size); | |
| 152 return object->GetReference(); | |
| 153 } | |
| 154 | |
| 155 PP_Resource ResourceCreationProxy::CreateTrueTypeFont( | 145 PP_Resource ResourceCreationProxy::CreateTrueTypeFont( |
| 156 PP_Instance instance, | 146 PP_Instance instance, |
| 157 const PP_TrueTypeFontDesc_Dev* desc) { | 147 const PP_TrueTypeFontDesc_Dev* desc) { |
| 158 return (new TrueTypeFontResource(GetConnection(), | 148 return (new TrueTypeFontResource(GetConnection(), |
| 159 instance, *desc))->GetReference(); | 149 instance, *desc))->GetReference(); |
| 160 | 150 |
| 161 } | 151 } |
| 162 | 152 |
| 163 PP_Resource ResourceCreationProxy::CreateURLLoader(PP_Instance instance) { | 153 PP_Resource ResourceCreationProxy::CreateURLLoader(PP_Instance instance) { |
| 164 return (new URLLoaderResource(GetConnection(), instance))->GetReference(); | 154 return (new URLLoaderResource(GetConnection(), instance))->GetReference(); |
| (...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 471 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) { | 461 bool ResourceCreationProxy::OnMessageReceived(const IPC::Message& msg) { |
| 472 return false; | 462 return false; |
| 473 } | 463 } |
| 474 | 464 |
| 475 Connection ResourceCreationProxy::GetConnection() { | 465 Connection ResourceCreationProxy::GetConnection() { |
| 476 return Connection(PluginGlobals::Get()->GetBrowserSender(), dispatcher()); | 466 return Connection(PluginGlobals::Get()->GetBrowserSender(), dispatcher()); |
| 477 } | 467 } |
| 478 | 468 |
| 479 } // namespace proxy | 469 } // namespace proxy |
| 480 } // namespace ppapi | 470 } // namespace ppapi |
| OLD | NEW |