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 | 9 |
10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
12 #include "base/debug/alias.h" | 12 #include "base/debug/alias.h" |
13 #include "base/debug/asan_invalid_access.h" | 13 #include "base/debug/asan_invalid_access.h" |
14 #include "base/debug/dump_without_crashing.h" | 14 #include "base/debug/dump_without_crashing.h" |
15 #include "base/i18n/char_iterator.h" | 15 #include "base/i18n/char_iterator.h" |
16 #include "base/metrics/histogram.h" | 16 #include "base/metrics/histogram.h" |
17 #include "base/process/process.h" | 17 #include "base/process/process.h" |
18 #include "base/strings/string16.h" | 18 #include "base/strings/string16.h" |
19 #include "base/strings/utf_string_conversions.h" | 19 #include "base/strings/utf_string_conversions.h" |
20 #include "base/thread_task_runner_handle.h" | |
21 #include "base/time/time.h" | 20 #include "base/time/time.h" |
22 #include "cc/base/switches.h" | 21 #include "cc/base/switches.h" |
23 #include "components/scheduler/renderer/renderer_scheduler.h" | 22 #include "components/scheduler/renderer/renderer_scheduler.h" |
24 #include "content/child/appcache/appcache_dispatcher.h" | 23 #include "content/child/appcache/appcache_dispatcher.h" |
25 #include "content/child/permissions/permission_dispatcher.h" | 24 #include "content/child/permissions/permission_dispatcher.h" |
26 #include "content/child/plugin_messages.h" | 25 #include "content/child/plugin_messages.h" |
27 #include "content/child/quota_dispatcher.h" | 26 #include "content/child/quota_dispatcher.h" |
28 #include "content/child/request_extra_data.h" | 27 #include "content/child/request_extra_data.h" |
29 #include "content/child/service_worker/service_worker_handle_reference.h" | 28 #include "content/child/service_worker/service_worker_handle_reference.h" |
30 #include "content/child/service_worker/service_worker_network_provider.h" | 29 #include "content/child/service_worker/service_worker_network_provider.h" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
74 #include "content/renderer/geolocation_dispatcher.h" | 73 #include "content/renderer/geolocation_dispatcher.h" |
75 #include "content/renderer/gpu/gpu_benchmarking_extension.h" | 74 #include "content/renderer/gpu/gpu_benchmarking_extension.h" |
76 #include "content/renderer/history_controller.h" | 75 #include "content/renderer/history_controller.h" |
77 #include "content/renderer/history_serialization.h" | 76 #include "content/renderer/history_serialization.h" |
78 #include "content/renderer/image_downloader/image_downloader_impl.h" | 77 #include "content/renderer/image_downloader/image_downloader_impl.h" |
79 #include "content/renderer/ime_event_guard.h" | 78 #include "content/renderer/ime_event_guard.h" |
80 #include "content/renderer/internal_document_state_data.h" | 79 #include "content/renderer/internal_document_state_data.h" |
81 #include "content/renderer/manifest/manifest_manager.h" | 80 #include "content/renderer/manifest/manifest_manager.h" |
82 #include "content/renderer/media/audio_renderer_mixer_manager.h" | 81 #include "content/renderer/media/audio_renderer_mixer_manager.h" |
83 #include "content/renderer/media/crypto/render_cdm_factory.h" | 82 #include "content/renderer/media/crypto/render_cdm_factory.h" |
84 #include "content/renderer/media/media_permission_dispatcher.h" | 83 #include "content/renderer/media/media_permission_dispatcher_impl.h" |
84 #include "content/renderer/media/media_permission_dispatcher_proxy.h" | |
85 #include "content/renderer/media/media_stream_dispatcher.h" | 85 #include "content/renderer/media/media_stream_dispatcher.h" |
86 #include "content/renderer/media/media_stream_renderer_factory_impl.h" | 86 #include "content/renderer/media/media_stream_renderer_factory_impl.h" |
87 #include "content/renderer/media/midi_dispatcher.h" | 87 #include "content/renderer/media/midi_dispatcher.h" |
88 #include "content/renderer/media/render_media_log.h" | 88 #include "content/renderer/media/render_media_log.h" |
89 #include "content/renderer/media/user_media_client_impl.h" | 89 #include "content/renderer/media/user_media_client_impl.h" |
90 #include "content/renderer/media/webmediaplayer_ms.h" | 90 #include "content/renderer/media/webmediaplayer_ms.h" |
91 #include "content/renderer/memory_benchmarking_extension.h" | 91 #include "content/renderer/memory_benchmarking_extension.h" |
92 #include "content/renderer/mojo/service_registry_js_wrapper.h" | 92 #include "content/renderer/mojo/service_registry_js_wrapper.h" |
93 #include "content/renderer/navigation_state_impl.h" | 93 #include "content/renderer/navigation_state_impl.h" |
94 #include "content/renderer/notification_permission_dispatcher.h" | 94 #include "content/renderer/notification_permission_dispatcher.h" |
(...skipping 4886 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4981 GetMediaPlayerManager(), GetCdmFactory(), stream_texture_factory, params); | 4981 GetMediaPlayerManager(), GetCdmFactory(), stream_texture_factory, params); |
4982 } | 4982 } |
4983 | 4983 |
4984 RendererMediaPlayerManager* RenderFrameImpl::GetMediaPlayerManager() { | 4984 RendererMediaPlayerManager* RenderFrameImpl::GetMediaPlayerManager() { |
4985 if (!media_player_manager_) | 4985 if (!media_player_manager_) |
4986 media_player_manager_ = new RendererMediaPlayerManager(this); | 4986 media_player_manager_ = new RendererMediaPlayerManager(this); |
4987 return media_player_manager_; | 4987 return media_player_manager_; |
4988 } | 4988 } |
4989 #endif // defined(OS_ANDROID) | 4989 #endif // defined(OS_ANDROID) |
4990 | 4990 |
4991 scoped_ptr<media::MediaPermission> RenderFrameImpl::CreateMediaPermissionProxy( | |
perkj_chrome
2015/09/22 08:24:16
Where is this used? Can it be moved away from the
guoweis_left_chromium
2015/09/22 18:48:49
This is used by the follow up CL.
| |
4992 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner) { | |
4993 MediaPermissionDispatcherImpl* media_permission = | |
4994 static_cast<MediaPermissionDispatcherImpl*>(GetMediaPermission()); | |
4995 return media_permission->CreateProxy(caller_task_runner).Pass(); | |
4996 } | |
4997 | |
4991 media::MediaPermission* RenderFrameImpl::GetMediaPermission() { | 4998 media::MediaPermission* RenderFrameImpl::GetMediaPermission() { |
4992 if (!media_permission_dispatcher_) | 4999 if (!media_permission_dispatcher_) |
4993 media_permission_dispatcher_ = new MediaPermissionDispatcher(this); | 5000 media_permission_dispatcher_ = new MediaPermissionDispatcherImpl(this); |
4994 return media_permission_dispatcher_; | 5001 return media_permission_dispatcher_; |
4995 } | 5002 } |
4996 | 5003 |
4997 #if defined(ENABLE_MOJO_MEDIA) | 5004 #if defined(ENABLE_MOJO_MEDIA) |
4998 media::interfaces::ServiceFactory* RenderFrameImpl::GetMediaServiceFactory() { | 5005 media::interfaces::ServiceFactory* RenderFrameImpl::GetMediaServiceFactory() { |
4999 if (!media_service_factory_) { | 5006 if (!media_service_factory_) { |
5000 mojo::ServiceProviderPtr service_provider = | 5007 mojo::ServiceProviderPtr service_provider = |
5001 ConnectToApplication(GURL("mojo:media")); | 5008 ConnectToApplication(GURL("mojo:media")); |
5002 mojo::ConnectToService(service_provider.get(), &media_service_factory_); | 5009 mojo::ConnectToService(service_provider.get(), &media_service_factory_); |
5003 media_service_factory_.set_connection_error_handler( | 5010 media_service_factory_.set_connection_error_handler( |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5067 mojo::ServiceProviderPtr service_provider; | 5074 mojo::ServiceProviderPtr service_provider; |
5068 mojo::URLRequestPtr request(mojo::URLRequest::New()); | 5075 mojo::URLRequestPtr request(mojo::URLRequest::New()); |
5069 request->url = mojo::String::From(url); | 5076 request->url = mojo::String::From(url); |
5070 mojo_shell_->ConnectToApplication(request.Pass(), GetProxy(&service_provider), | 5077 mojo_shell_->ConnectToApplication(request.Pass(), GetProxy(&service_provider), |
5071 nullptr, nullptr, | 5078 nullptr, nullptr, |
5072 base::Bind(&OnGotContentHandlerID)); | 5079 base::Bind(&OnGotContentHandlerID)); |
5073 return service_provider.Pass(); | 5080 return service_provider.Pass(); |
5074 } | 5081 } |
5075 | 5082 |
5076 } // namespace content | 5083 } // namespace content |
OLD | NEW |