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/content_renderer_pepper_host_factory.h" | 5 #include "content/renderer/pepper/content_renderer_pepper_host_factory.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
9 #include "content/public/common/content_client.h" | 9 #include "content/public/common/content_client.h" |
10 #include "content/public/renderer/content_renderer_client.h" | 10 #include "content/public/renderer/content_renderer_client.h" |
11 #include "content/renderer/pepper/pepper_audio_input_host.h" | 11 #include "content/renderer/pepper/pepper_audio_input_host.h" |
12 #include "content/renderer/pepper/pepper_compositor_host.h" | 12 #include "content/renderer/pepper/pepper_compositor_host.h" |
13 #include "content/renderer/pepper/pepper_file_chooser_host.h" | 13 #include "content/renderer/pepper/pepper_file_chooser_host.h" |
14 #include "content/renderer/pepper/pepper_file_ref_renderer_host.h" | 14 #include "content/renderer/pepper/pepper_file_ref_renderer_host.h" |
15 #include "content/renderer/pepper/pepper_file_system_host.h" | 15 #include "content/renderer/pepper/pepper_file_system_host.h" |
16 #include "content/renderer/pepper/pepper_graphics_2d_host.h" | 16 #include "content/renderer/pepper/pepper_graphics_2d_host.h" |
17 #include "content/renderer/pepper/pepper_media_stream_video_track_host.h" | 17 #include "content/renderer/pepper/pepper_media_stream_video_track_host.h" |
18 #include "content/renderer/pepper/pepper_plugin_instance_impl.h" | 18 #include "content/renderer/pepper/pepper_plugin_instance_impl.h" |
19 #include "content/renderer/pepper/pepper_url_loader_host.h" | 19 #include "content/renderer/pepper/pepper_url_loader_host.h" |
20 #include "content/renderer/pepper/pepper_video_capture_host.h" | 20 #include "content/renderer/pepper/pepper_video_capture_host.h" |
21 #include "content/renderer/pepper/pepper_video_decoder_host.h" | 21 #include "content/renderer/pepper/pepper_video_decoder_host.h" |
22 #include "content/renderer/pepper/pepper_video_destination_host.h" | 22 #include "content/renderer/pepper/pepper_video_destination_host.h" |
| 23 #include "content/renderer/pepper/pepper_video_encoder_host.h" |
23 #include "content/renderer/pepper/pepper_video_source_host.h" | 24 #include "content/renderer/pepper/pepper_video_source_host.h" |
24 #include "content/renderer/pepper/pepper_websocket_host.h" | 25 #include "content/renderer/pepper/pepper_websocket_host.h" |
25 #include "content/renderer/pepper/ppb_image_data_impl.h" | 26 #include "content/renderer/pepper/ppb_image_data_impl.h" |
26 #include "content/renderer/pepper/renderer_ppapi_host_impl.h" | 27 #include "content/renderer/pepper/renderer_ppapi_host_impl.h" |
27 #include "ppapi/host/resource_host.h" | 28 #include "ppapi/host/resource_host.h" |
28 #include "ppapi/proxy/ppapi_message_utils.h" | 29 #include "ppapi/proxy/ppapi_message_utils.h" |
29 #include "ppapi/proxy/ppapi_messages.h" | 30 #include "ppapi/proxy/ppapi_messages.h" |
30 #include "ppapi/proxy/serialized_structs.h" | 31 #include "ppapi/proxy/serialized_structs.h" |
31 #include "ppapi/shared_impl/ppb_image_data_shared.h" | 32 #include "ppapi/shared_impl/ppb_image_data_shared.h" |
32 #include "third_party/WebKit/public/platform/WebURL.h" | 33 #include "third_party/WebKit/public/platform/WebURL.h" |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 instance, image_type)); | 155 instance, image_type)); |
155 return scoped_ptr<ResourceHost>(PepperGraphics2DHost::Create( | 156 return scoped_ptr<ResourceHost>(PepperGraphics2DHost::Create( |
156 host_, instance, resource, size, is_always_opaque, image_data)); | 157 host_, instance, resource, size, is_always_opaque, image_data)); |
157 } | 158 } |
158 case PpapiHostMsg_URLLoader_Create::ID: | 159 case PpapiHostMsg_URLLoader_Create::ID: |
159 return scoped_ptr<ResourceHost>( | 160 return scoped_ptr<ResourceHost>( |
160 new PepperURLLoaderHost(host_, false, instance, resource)); | 161 new PepperURLLoaderHost(host_, false, instance, resource)); |
161 case PpapiHostMsg_VideoDecoder_Create::ID: | 162 case PpapiHostMsg_VideoDecoder_Create::ID: |
162 return scoped_ptr<ResourceHost>( | 163 return scoped_ptr<ResourceHost>( |
163 new PepperVideoDecoderHost(host_, instance, resource)); | 164 new PepperVideoDecoderHost(host_, instance, resource)); |
| 165 case PpapiHostMsg_VideoEncoder_Create::ID: |
| 166 return scoped_ptr<ResourceHost>( |
| 167 new PepperVideoEncoderHost(host_, instance, resource)); |
164 case PpapiHostMsg_WebSocket_Create::ID: | 168 case PpapiHostMsg_WebSocket_Create::ID: |
165 return scoped_ptr<ResourceHost>( | 169 return scoped_ptr<ResourceHost>( |
166 new PepperWebSocketHost(host_, instance, resource)); | 170 new PepperWebSocketHost(host_, instance, resource)); |
167 #if defined(ENABLE_WEBRTC) | 171 #if defined(ENABLE_WEBRTC) |
168 case PpapiHostMsg_MediaStreamVideoTrack_Create::ID: | 172 case PpapiHostMsg_MediaStreamVideoTrack_Create::ID: |
169 return scoped_ptr<ResourceHost>( | 173 return scoped_ptr<ResourceHost>( |
170 new PepperMediaStreamVideoTrackHost(host_, instance, resource)); | 174 new PepperMediaStreamVideoTrackHost(host_, instance, resource)); |
171 // These private MediaStream interfaces are exposed as if they were public | 175 // These private MediaStream interfaces are exposed as if they were public |
172 // so they can be used by NaCl plugins. However, they are available only | 176 // so they can be used by NaCl plugins. However, they are available only |
173 // for whitelisted apps. | 177 // for whitelisted apps. |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 | 209 |
206 return scoped_ptr<ResourceHost>(); | 210 return scoped_ptr<ResourceHost>(); |
207 } | 211 } |
208 | 212 |
209 const ppapi::PpapiPermissions& | 213 const ppapi::PpapiPermissions& |
210 ContentRendererPepperHostFactory::GetPermissions() const { | 214 ContentRendererPepperHostFactory::GetPermissions() const { |
211 return host_->GetPpapiHost()->permissions(); | 215 return host_->GetPpapiHost()->permissions(); |
212 } | 216 } |
213 | 217 |
214 } // namespace content | 218 } // namespace content |
OLD | NEW |