OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/render_frame_impl.h" | 5 #include "content/renderer/render_frame_impl.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 #else | 228 #else |
229 #include "content/renderer/media/cdm/render_cdm_factory.h" | 229 #include "content/renderer/media/cdm/render_cdm_factory.h" |
230 #endif | 230 #endif |
231 | 231 |
232 #if defined(ENABLE_MOJO_RENDERER) | 232 #if defined(ENABLE_MOJO_RENDERER) |
233 #include "media/mojo/services/mojo_renderer_factory.h" // nogncheck | 233 #include "media/mojo/services/mojo_renderer_factory.h" // nogncheck |
234 #else | 234 #else |
235 #include "media/renderers/default_renderer_factory.h" | 235 #include "media/renderers/default_renderer_factory.h" |
236 #endif | 236 #endif |
237 | 237 |
238 #if defined(ENABLE_MOJO_AUDIO_DECODER) | 238 #if defined(ENABLE_MOJO_AUDIO_DECODER) || defined(ENABLE_MOJO_VIDEO_DECODER) |
239 #include "media/mojo/services/mojo_decoder_factory.h" // nogncheck | 239 #include "media/mojo/services/mojo_decoder_factory.h" // nogncheck |
240 #endif | 240 #endif |
241 | 241 |
242 #if defined(ENABLE_WEBVR) | 242 #if defined(ENABLE_WEBVR) |
243 #include "content/renderer/vr/vr_dispatcher.h" | 243 #include "content/renderer/vr/vr_dispatcher.h" |
244 #endif | 244 #endif |
245 | 245 |
246 using blink::WebContentDecryptionModule; | 246 using blink::WebContentDecryptionModule; |
247 using blink::WebContextMenuData; | 247 using blink::WebContextMenuData; |
248 using blink::WebCString; | 248 using blink::WebCString; |
(...skipping 5746 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5995 cdm_manager_ | 5995 cdm_manager_ |
5996 #endif | 5996 #endif |
5997 )); | 5997 )); |
5998 #endif // defined(ENABLE_MOJO_CDM) | 5998 #endif // defined(ENABLE_MOJO_CDM) |
5999 } | 5999 } |
6000 | 6000 |
6001 return cdm_factory_.get(); | 6001 return cdm_factory_.get(); |
6002 } | 6002 } |
6003 | 6003 |
6004 media::DecoderFactory* RenderFrameImpl::GetDecoderFactory() { | 6004 media::DecoderFactory* RenderFrameImpl::GetDecoderFactory() { |
6005 #if defined(ENABLE_MOJO_AUDIO_DECODER) | 6005 #if defined(ENABLE_MOJO_AUDIO_DECODER) || defined(ENABLE_MOJO_VIDEO_DECODER) |
6006 if (!decoder_factory_) { | 6006 if (!decoder_factory_) { |
6007 decoder_factory_.reset( | 6007 decoder_factory_.reset( |
6008 new media::MojoDecoderFactory(GetMediaServiceFactory())); | 6008 new media::MojoDecoderFactory(GetMediaInterfaceProvider())); |
6009 } | 6009 } |
6010 #endif | 6010 #endif |
6011 return decoder_factory_.get(); | 6011 return decoder_factory_.get(); |
6012 } | 6012 } |
6013 | 6013 |
6014 void RenderFrameImpl::RegisterMojoServices() { | 6014 void RenderFrameImpl::RegisterMojoServices() { |
6015 // Only main frame have ImageDownloader service. | 6015 // Only main frame have ImageDownloader service. |
6016 if (!frame_->parent()) { | 6016 if (!frame_->parent()) { |
6017 GetServiceRegistry()->AddService(base::Bind( | 6017 GetServiceRegistry()->AddService(base::Bind( |
6018 &ImageDownloaderImpl::CreateMojoService, base::Unretained(this))); | 6018 &ImageDownloaderImpl::CreateMojoService, base::Unretained(this))); |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6074 int match_count, | 6074 int match_count, |
6075 int ordinal, | 6075 int ordinal, |
6076 const WebRect& selection_rect, | 6076 const WebRect& selection_rect, |
6077 bool final_status_update) { | 6077 bool final_status_update) { |
6078 Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count, | 6078 Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count, |
6079 selection_rect, ordinal, | 6079 selection_rect, ordinal, |
6080 final_status_update)); | 6080 final_status_update)); |
6081 } | 6081 } |
6082 | 6082 |
6083 } // namespace content | 6083 } // namespace content |
OLD | NEW |