| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "webkit/plugins/ppapi/resource_creation_impl.h" | 5 #include "webkit/plugins/ppapi/resource_creation_impl.h" |
| 6 | 6 |
| 7 #include "ppapi/c/pp_size.h" | 7 #include "ppapi/c/pp_size.h" |
| 8 #include "ppapi/shared_impl/audio_config_impl.h" | 8 #include "ppapi/shared_impl/audio_config_impl.h" |
| 9 #include "ppapi/shared_impl/input_event_impl.h" | 9 #include "ppapi/shared_impl/input_event_impl.h" |
| 10 #include "ppapi/shared_impl/var.h" | 10 #include "ppapi/shared_impl/var.h" |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 PP_Instance instance, | 132 PP_Instance instance, |
| 133 const PP_Flash_Menu* menu_data) { | 133 const PP_Flash_Menu* menu_data) { |
| 134 return PPB_Flash_Menu_Impl::Create(instance, menu_data); | 134 return PPB_Flash_Menu_Impl::Create(instance, menu_data); |
| 135 } | 135 } |
| 136 | 136 |
| 137 PP_Resource ResourceCreationImpl::CreateFlashNetConnector( | 137 PP_Resource ResourceCreationImpl::CreateFlashNetConnector( |
| 138 PP_Instance instance) { | 138 PP_Instance instance) { |
| 139 return (new PPB_Flash_NetConnector_Impl(instance))->GetReference(); | 139 return (new PPB_Flash_NetConnector_Impl(instance))->GetReference(); |
| 140 } | 140 } |
| 141 | 141 |
| 142 PP_Resource ResourceCreationImpl::CreateFlashTCPSocket( | |
| 143 PP_Instance instance) { | |
| 144 // Creating TCP socket resource at the renderer side is not supported. | |
| 145 return 0; | |
| 146 } | |
| 147 | |
| 148 PP_Resource ResourceCreationImpl::CreateFlashUDPSocket( | |
| 149 PP_Instance instance) { | |
| 150 // Creating UDP socket resource at the renderer side is not supported. | |
| 151 return 0; | |
| 152 } | |
| 153 | |
| 154 PP_Resource ResourceCreationImpl::CreateFontObject( | 142 PP_Resource ResourceCreationImpl::CreateFontObject( |
| 155 PP_Instance instance, | 143 PP_Instance instance, |
| 156 const PP_FontDescription_Dev* description) { | 144 const PP_FontDescription_Dev* description) { |
| 157 return PPB_Font_Impl::Create(instance, *description); | 145 return PPB_Font_Impl::Create(instance, *description); |
| 158 } | 146 } |
| 159 | 147 |
| 160 PP_Resource ResourceCreationImpl::CreateGraphics2D( | 148 PP_Resource ResourceCreationImpl::CreateGraphics2D( |
| 161 PP_Instance instance, | 149 PP_Instance instance, |
| 162 const PP_Size& size, | 150 const PP_Size& size, |
| 163 PP_Bool is_always_opaque) { | 151 PP_Bool is_always_opaque) { |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 return PPB_Scrollbar_Impl::Create(instance, PP_ToBool(vertical)); | 236 return PPB_Scrollbar_Impl::Create(instance, PP_ToBool(vertical)); |
| 249 } | 237 } |
| 250 | 238 |
| 251 PP_Resource ResourceCreationImpl::CreateSurface3D( | 239 PP_Resource ResourceCreationImpl::CreateSurface3D( |
| 252 PP_Instance instance, | 240 PP_Instance instance, |
| 253 PP_Config3D_Dev config, | 241 PP_Config3D_Dev config, |
| 254 const int32_t* attrib_list) { | 242 const int32_t* attrib_list) { |
| 255 return PPB_Surface3D_Impl::Create(instance, config, attrib_list); | 243 return PPB_Surface3D_Impl::Create(instance, config, attrib_list); |
| 256 } | 244 } |
| 257 | 245 |
| 246 |
| 247 PP_Resource ResourceCreationImpl::CreateTCPSocketPrivate(PP_Instance instance) { |
| 248 // Creating TCP socket resource at the renderer side is not supported. |
| 249 return 0; |
| 250 } |
| 251 |
| 258 PP_Resource ResourceCreationImpl::CreateTransport(PP_Instance instance, | 252 PP_Resource ResourceCreationImpl::CreateTransport(PP_Instance instance, |
| 259 const char* name, | 253 const char* name, |
| 260 PP_TransportType type) { | 254 PP_TransportType type) { |
| 261 #if defined(ENABLE_P2P_APIS) | 255 #if defined(ENABLE_P2P_APIS) |
| 262 return PPB_Transport_Impl::Create(instance, name, type); | 256 return PPB_Transport_Impl::Create(instance, name, type); |
| 263 #endif | 257 #endif |
| 264 } | 258 } |
| 265 | 259 |
| 260 PP_Resource ResourceCreationImpl::CreateUDPSocketPrivate(PP_Instance instance) { |
| 261 // Creating UDP socket resource at the renderer side is not supported. |
| 262 return 0; |
| 263 } |
| 264 |
| 266 PP_Resource ResourceCreationImpl::CreateURLLoader(PP_Instance instance) { | 265 PP_Resource ResourceCreationImpl::CreateURLLoader(PP_Instance instance) { |
| 267 return (new PPB_URLLoader_Impl(instance, false))->GetReference(); | 266 return (new PPB_URLLoader_Impl(instance, false))->GetReference(); |
| 268 } | 267 } |
| 269 | 268 |
| 270 PP_Resource ResourceCreationImpl::CreateURLRequestInfo( | 269 PP_Resource ResourceCreationImpl::CreateURLRequestInfo( |
| 271 PP_Instance instance, | 270 PP_Instance instance, |
| 272 const ::ppapi::PPB_URLRequestInfo_Data& data) { | 271 const ::ppapi::PPB_URLRequestInfo_Data& data) { |
| 273 return (new PPB_URLRequestInfo_Impl(instance, data))->GetReference(); | 272 return (new PPB_URLRequestInfo_Impl(instance, data))->GetReference(); |
| 274 } | 273 } |
| 275 | 274 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 307 data.wheel_delta = *wheel_delta; | 306 data.wheel_delta = *wheel_delta; |
| 308 data.wheel_ticks = *wheel_ticks; | 307 data.wheel_ticks = *wheel_ticks; |
| 309 data.wheel_scroll_by_page = PP_ToBool(scroll_by_page); | 308 data.wheel_scroll_by_page = PP_ToBool(scroll_by_page); |
| 310 | 309 |
| 311 return (new InputEventImpl(InputEventImpl::InitAsImpl(), | 310 return (new InputEventImpl(InputEventImpl::InitAsImpl(), |
| 312 instance, data))->GetReference(); | 311 instance, data))->GetReference(); |
| 313 } | 312 } |
| 314 | 313 |
| 315 } // namespace ppapi | 314 } // namespace ppapi |
| 316 } // namespace webkit | 315 } // namespace webkit |
| OLD | NEW |