| 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/renderer_blink_platform_impl.h" | 5 #include "content/renderer/renderer_blink_platform_impl.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 #include "content/renderer/cache_storage/webserviceworkercachestorage_impl.h" | 52 #include "content/renderer/cache_storage/webserviceworkercachestorage_impl.h" |
| 53 #include "content/renderer/device_sensors/device_light_event_pump.h" | 53 #include "content/renderer/device_sensors/device_light_event_pump.h" |
| 54 #include "content/renderer/device_sensors/device_motion_event_pump.h" | 54 #include "content/renderer/device_sensors/device_motion_event_pump.h" |
| 55 #include "content/renderer/device_sensors/device_orientation_absolute_event_pump
.h" | 55 #include "content/renderer/device_sensors/device_orientation_absolute_event_pump
.h" |
| 56 #include "content/renderer/device_sensors/device_orientation_event_pump.h" | 56 #include "content/renderer/device_sensors/device_orientation_event_pump.h" |
| 57 #include "content/renderer/dom_storage/local_storage_cached_areas.h" | 57 #include "content/renderer/dom_storage/local_storage_cached_areas.h" |
| 58 #include "content/renderer/dom_storage/local_storage_namespace.h" | 58 #include "content/renderer/dom_storage/local_storage_namespace.h" |
| 59 #include "content/renderer/dom_storage/webstoragenamespace_impl.h" | 59 #include "content/renderer/dom_storage/webstoragenamespace_impl.h" |
| 60 #include "content/renderer/gamepad_shared_memory_reader.h" | 60 #include "content/renderer/gamepad_shared_memory_reader.h" |
| 61 #include "content/renderer/media/audio_decoder.h" | 61 #include "content/renderer/media/audio_decoder.h" |
| 62 #include "content/renderer/media/audio_device_factory.h" |
| 62 #include "content/renderer/media/canvas_capture_handler.h" | 63 #include "content/renderer/media/canvas_capture_handler.h" |
| 63 #include "content/renderer/media/html_audio_element_capturer_source.h" | 64 #include "content/renderer/media/html_audio_element_capturer_source.h" |
| 64 #include "content/renderer/media/html_video_element_capturer_source.h" | 65 #include "content/renderer/media/html_video_element_capturer_source.h" |
| 65 #include "content/renderer/media/image_capture_frame_grabber.h" | 66 #include "content/renderer/media/image_capture_frame_grabber.h" |
| 66 #include "content/renderer/media/media_recorder_handler.h" | 67 #include "content/renderer/media/media_recorder_handler.h" |
| 67 #include "content/renderer/media/renderer_webaudiodevice_impl.h" | 68 #include "content/renderer/media/renderer_webaudiodevice_impl.h" |
| 68 #include "content/renderer/media/renderer_webmidiaccessor_impl.h" | 69 #include "content/renderer/media/renderer_webmidiaccessor_impl.h" |
| 69 #include "content/renderer/media/rtc_certificate_generator.h" | 70 #include "content/renderer/media/rtc_certificate_generator.h" |
| 70 #include "content/renderer/mojo/blink_service_registry_impl.h" | 71 #include "content/renderer/mojo/blink_service_registry_impl.h" |
| 71 #include "content/renderer/render_thread_impl.h" | 72 #include "content/renderer/render_thread_impl.h" |
| 72 #include "content/renderer/renderer_clipboard_delegate.h" | 73 #include "content/renderer/renderer_clipboard_delegate.h" |
| 73 #include "content/renderer/screen_orientation/screen_orientation_observer.h" | 74 #include "content/renderer/screen_orientation/screen_orientation_observer.h" |
| 74 #include "content/renderer/webclipboard_impl.h" | 75 #include "content/renderer/webclipboard_impl.h" |
| 75 #include "content/renderer/webgraphicscontext3d_provider_impl.h" | 76 #include "content/renderer/webgraphicscontext3d_provider_impl.h" |
| 76 #include "content/renderer/webpublicsuffixlist_impl.h" | 77 #include "content/renderer/webpublicsuffixlist_impl.h" |
| 77 #include "gpu/command_buffer/client/gles2_interface.h" | 78 #include "gpu/command_buffer/client/gles2_interface.h" |
| 78 #include "gpu/config/gpu_info.h" | 79 #include "gpu/config/gpu_info.h" |
| 79 #include "gpu/ipc/client/gpu_channel_host.h" | 80 #include "gpu/ipc/client/gpu_channel_host.h" |
| 80 #include "gpu/ipc/common/gpu_stream_constants.h" | 81 #include "gpu/ipc/common/gpu_stream_constants.h" |
| 81 #include "ipc/ipc_sync_message_filter.h" | 82 #include "ipc/ipc_sync_message_filter.h" |
| 82 #include "media/audio/audio_output_device.h" | 83 #include "media/audio/audio_output_device.h" |
| 83 #include "media/base/audio_hardware_config.h" | |
| 84 #include "media/base/mime_util.h" | 84 #include "media/base/mime_util.h" |
| 85 #include "media/blink/webcontentdecryptionmodule_impl.h" | 85 #include "media/blink/webcontentdecryptionmodule_impl.h" |
| 86 #include "media/filters/stream_parser_factory.h" | 86 #include "media/filters/stream_parser_factory.h" |
| 87 #include "mojo/common/common_type_converters.h" | 87 #include "mojo/common/common_type_converters.h" |
| 88 #include "storage/common/database/database_identifier.h" | 88 #include "storage/common/database/database_identifier.h" |
| 89 #include "storage/common/quota/quota_types.h" | 89 #include "storage/common/quota/quota_types.h" |
| 90 #include "third_party/WebKit/public/platform/BlameContext.h" | 90 #include "third_party/WebKit/public/platform/BlameContext.h" |
| 91 #include "third_party/WebKit/public/platform/FilePathConversion.h" | 91 #include "third_party/WebKit/public/platform/FilePathConversion.h" |
| 92 #include "third_party/WebKit/public/platform/URLConversion.h" | 92 #include "third_party/WebKit/public/platform/URLConversion.h" |
| 93 #include "third_party/WebKit/public/platform/WebBlobRegistry.h" | 93 #include "third_party/WebKit/public/platform/WebBlobRegistry.h" |
| (...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 679 // thread can be NULL in tests. | 679 // thread can be NULL in tests. |
| 680 return thread && thread->compositor_task_runner().get(); | 680 return thread && thread->compositor_task_runner().get(); |
| 681 } | 681 } |
| 682 | 682 |
| 683 bool RendererBlinkPlatformImpl::isThreadedAnimationEnabled() { | 683 bool RendererBlinkPlatformImpl::isThreadedAnimationEnabled() { |
| 684 RenderThreadImpl* thread = RenderThreadImpl::current(); | 684 RenderThreadImpl* thread = RenderThreadImpl::current(); |
| 685 return thread ? thread->IsThreadedAnimationEnabled() : true; | 685 return thread ? thread->IsThreadedAnimationEnabled() : true; |
| 686 } | 686 } |
| 687 | 687 |
| 688 double RendererBlinkPlatformImpl::audioHardwareSampleRate() { | 688 double RendererBlinkPlatformImpl::audioHardwareSampleRate() { |
| 689 RenderThreadImpl* thread = RenderThreadImpl::current(); | 689 return AudioDeviceFactory::GetOutputDeviceInfo(MSG_ROUTING_NONE, 0, |
| 690 return thread->GetAudioHardwareConfig()->GetOutputSampleRate(); | 690 std::string(), url::Origin()) |
| 691 .output_params() |
| 692 .sample_rate(); |
| 691 } | 693 } |
| 692 | 694 |
| 693 size_t RendererBlinkPlatformImpl::audioHardwareBufferSize() { | 695 size_t RendererBlinkPlatformImpl::audioHardwareBufferSize() { |
| 694 RenderThreadImpl* thread = RenderThreadImpl::current(); | 696 return AudioDeviceFactory::GetOutputDeviceInfo(MSG_ROUTING_NONE, 0, |
| 695 return thread->GetAudioHardwareConfig()->GetOutputBufferSize(); | 697 std::string(), url::Origin()) |
| 698 .output_params() |
| 699 .frames_per_buffer(); |
| 696 } | 700 } |
| 697 | 701 |
| 698 unsigned RendererBlinkPlatformImpl::audioHardwareOutputChannels() { | 702 unsigned RendererBlinkPlatformImpl::audioHardwareOutputChannels() { |
| 699 RenderThreadImpl* thread = RenderThreadImpl::current(); | 703 return AudioDeviceFactory::GetOutputDeviceInfo(MSG_ROUTING_NONE, 0, |
| 700 return thread->GetAudioHardwareConfig()->GetOutputChannels(); | 704 std::string(), url::Origin()) |
| 705 .output_params() |
| 706 .channels(); |
| 701 } | 707 } |
| 702 | 708 |
| 703 WebDatabaseObserver* RendererBlinkPlatformImpl::databaseObserver() { | 709 WebDatabaseObserver* RendererBlinkPlatformImpl::databaseObserver() { |
| 704 return web_database_observer_impl_.get(); | 710 return web_database_observer_impl_.get(); |
| 705 } | 711 } |
| 706 | 712 |
| 707 WebAudioDevice* RendererBlinkPlatformImpl::createAudioDevice( | 713 WebAudioDevice* RendererBlinkPlatformImpl::createAudioDevice( |
| 708 size_t buffer_size, | 714 size_t buffer_size, |
| 709 unsigned input_channels, | 715 unsigned input_channels, |
| 710 unsigned channels, | 716 unsigned channels, |
| (...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1308 return &trial_token_validator_; | 1314 return &trial_token_validator_; |
| 1309 } | 1315 } |
| 1310 | 1316 |
| 1311 void RendererBlinkPlatformImpl::workerContextCreated( | 1317 void RendererBlinkPlatformImpl::workerContextCreated( |
| 1312 const v8::Local<v8::Context>& worker) { | 1318 const v8::Local<v8::Context>& worker) { |
| 1313 GetContentClient()->renderer()->DidInitializeWorkerContextOnWorkerThread( | 1319 GetContentClient()->renderer()->DidInitializeWorkerContextOnWorkerThread( |
| 1314 worker); | 1320 worker); |
| 1315 } | 1321 } |
| 1316 | 1322 |
| 1317 } // namespace content | 1323 } // namespace content |
| OLD | NEW |