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