| 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/pepper_plugin_delegate_impl.h" | 5 #include "content/renderer/pepper/pepper_plugin_delegate_impl.h" |
| 6 | 6 |
| 7 #include <cmath> | 7 #include <cmath> |
| 8 #include <cstddef> | 8 #include <cstddef> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <queue> | 10 #include <queue> |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 #include "content/common/pepper_plugin_registry.h" | 28 #include "content/common/pepper_plugin_registry.h" |
| 29 #include "content/common/quota_dispatcher.h" | 29 #include "content/common/quota_dispatcher.h" |
| 30 #include "content/common/view_messages.h" | 30 #include "content/common/view_messages.h" |
| 31 #include "content/public/common/content_switches.h" | 31 #include "content/public/common/content_switches.h" |
| 32 #include "content/public/common/context_menu_params.h" | 32 #include "content/public/common/context_menu_params.h" |
| 33 #include "content/public/common/media_stream_request.h" | 33 #include "content/public/common/media_stream_request.h" |
| 34 #include "content/public/common/referrer.h" | 34 #include "content/public/common/referrer.h" |
| 35 #include "content/public/renderer/content_renderer_client.h" | 35 #include "content/public/renderer/content_renderer_client.h" |
| 36 #include "content/public/renderer/renderer_restrict_dispatch_group.h" | 36 #include "content/public/renderer/renderer_restrict_dispatch_group.h" |
| 37 #include "content/renderer/gamepad_shared_memory_reader.h" | 37 #include "content/renderer/gamepad_shared_memory_reader.h" |
| 38 #include "content/renderer/media/audio_hardware.h" | |
| 39 #include "content/renderer/media/media_stream_dispatcher.h" | 38 #include "content/renderer/media/media_stream_dispatcher.h" |
| 40 #include "content/renderer/media/pepper_platform_video_decoder_impl.h" | 39 #include "content/renderer/media/pepper_platform_video_decoder_impl.h" |
| 41 #include "content/renderer/p2p/socket_dispatcher.h" | 40 #include "content/renderer/p2p/socket_dispatcher.h" |
| 42 #include "content/renderer/pepper/content_renderer_pepper_host_factory.h" | 41 #include "content/renderer/pepper/content_renderer_pepper_host_factory.h" |
| 43 #include "content/renderer/pepper/pepper_broker_impl.h" | 42 #include "content/renderer/pepper/pepper_broker_impl.h" |
| 44 #include "content/renderer/pepper/pepper_device_enumeration_event_handler.h" | 43 #include "content/renderer/pepper/pepper_device_enumeration_event_handler.h" |
| 45 #include "content/renderer/pepper/pepper_hung_plugin_filter.h" | 44 #include "content/renderer/pepper/pepper_hung_plugin_filter.h" |
| 46 #include "content/renderer/pepper/pepper_in_process_resource_creation.h" | 45 #include "content/renderer/pepper/pepper_in_process_resource_creation.h" |
| 47 #include "content/renderer/pepper/pepper_platform_audio_input_impl.h" | 46 #include "content/renderer/pepper/pepper_platform_audio_input_impl.h" |
| 48 #include "content/renderer/pepper/pepper_platform_audio_output_impl.h" | 47 #include "content/renderer/pepper/pepper_platform_audio_output_impl.h" |
| 49 #include "content/renderer/pepper/pepper_platform_context_3d_impl.h" | 48 #include "content/renderer/pepper/pepper_platform_context_3d_impl.h" |
| 50 #include "content/renderer/pepper/pepper_platform_image_2d_impl.h" | 49 #include "content/renderer/pepper/pepper_platform_image_2d_impl.h" |
| 51 #include "content/renderer/pepper/pepper_platform_video_capture_impl.h" | 50 #include "content/renderer/pepper/pepper_platform_video_capture_impl.h" |
| 52 #include "content/renderer/pepper/pepper_proxy_channel_delegate_impl.h" | 51 #include "content/renderer/pepper/pepper_proxy_channel_delegate_impl.h" |
| 53 #include "content/renderer/pepper/renderer_ppapi_host_impl.h" | 52 #include "content/renderer/pepper/renderer_ppapi_host_impl.h" |
| 54 #include "content/renderer/render_thread_impl.h" | 53 #include "content/renderer/render_thread_impl.h" |
| 55 #include "content/renderer/render_view_impl.h" | 54 #include "content/renderer/render_view_impl.h" |
| 56 #include "content/renderer/render_widget_fullscreen_pepper.h" | 55 #include "content/renderer/render_widget_fullscreen_pepper.h" |
| 57 #include "content/renderer/webplugin_delegate_proxy.h" | 56 #include "content/renderer/webplugin_delegate_proxy.h" |
| 58 #include "googleurl/src/gurl.h" | 57 #include "googleurl/src/gurl.h" |
| 59 #include "ipc/ipc_channel_handle.h" | 58 #include "ipc/ipc_channel_handle.h" |
| 59 #include "media/base/audio_hardware_config.h" |
| 60 #include "media/video/capture/video_capture_proxy.h" | 60 #include "media/video/capture/video_capture_proxy.h" |
| 61 #include "ppapi/c/dev/pp_video_dev.h" | 61 #include "ppapi/c/dev/pp_video_dev.h" |
| 62 #include "ppapi/c/pp_errors.h" | 62 #include "ppapi/c/pp_errors.h" |
| 63 #include "ppapi/c/private/ppb_flash.h" | 63 #include "ppapi/c/private/ppb_flash.h" |
| 64 #include "ppapi/host/ppapi_host.h" | 64 #include "ppapi/host/ppapi_host.h" |
| 65 #include "ppapi/proxy/host_dispatcher.h" | 65 #include "ppapi/proxy/host_dispatcher.h" |
| 66 #include "ppapi/proxy/ppapi_messages.h" | 66 #include "ppapi/proxy/ppapi_messages.h" |
| 67 #include "ppapi/shared_impl/file_path.h" | 67 #include "ppapi/shared_impl/file_path.h" |
| 68 #include "ppapi/shared_impl/platform_file.h" | 68 #include "ppapi/shared_impl/platform_file.h" |
| 69 #include "ppapi/shared_impl/ppapi_permissions.h" | 69 #include "ppapi/shared_impl/ppapi_permissions.h" |
| (...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 857 render_view_->reportFindInPageMatchCount(identifier, total, final_result); | 857 render_view_->reportFindInPageMatchCount(identifier, total, final_result); |
| 858 } | 858 } |
| 859 | 859 |
| 860 void PepperPluginDelegateImpl::SelectedFindResultChanged(int identifier, | 860 void PepperPluginDelegateImpl::SelectedFindResultChanged(int identifier, |
| 861 int index) { | 861 int index) { |
| 862 render_view_->reportFindInPageSelection( | 862 render_view_->reportFindInPageSelection( |
| 863 identifier, index + 1, WebKit::WebRect()); | 863 identifier, index + 1, WebKit::WebRect()); |
| 864 } | 864 } |
| 865 | 865 |
| 866 uint32_t PepperPluginDelegateImpl::GetAudioHardwareOutputSampleRate() { | 866 uint32_t PepperPluginDelegateImpl::GetAudioHardwareOutputSampleRate() { |
| 867 return static_cast<uint32_t>(GetAudioOutputSampleRate()); | 867 RenderThreadImpl* thread = RenderThreadImpl::current(); |
| 868 return thread->GetAudioHardwareConfig()->GetOutputSampleRate(); |
| 868 } | 869 } |
| 869 | 870 |
| 870 uint32_t PepperPluginDelegateImpl::GetAudioHardwareOutputBufferSize() { | 871 uint32_t PepperPluginDelegateImpl::GetAudioHardwareOutputBufferSize() { |
| 871 return static_cast<uint32_t>(GetAudioOutputBufferSize()); | 872 RenderThreadImpl* thread = RenderThreadImpl::current(); |
| 873 return thread->GetAudioHardwareConfig()->GetOutputBufferSize(); |
| 872 } | 874 } |
| 873 | 875 |
| 874 webkit::ppapi::PluginDelegate::PlatformAudioOutput* | 876 webkit::ppapi::PluginDelegate::PlatformAudioOutput* |
| 875 PepperPluginDelegateImpl::CreateAudioOutput( | 877 PepperPluginDelegateImpl::CreateAudioOutput( |
| 876 uint32_t sample_rate, | 878 uint32_t sample_rate, |
| 877 uint32_t sample_count, | 879 uint32_t sample_count, |
| 878 webkit::ppapi::PluginDelegate::PlatformAudioOutputClient* client) { | 880 webkit::ppapi::PluginDelegate::PlatformAudioOutputClient* client) { |
| 879 return PepperPlatformAudioOutputImpl::Create( | 881 return PepperPlatformAudioOutputImpl::Create( |
| 880 static_cast<int>(sample_rate), static_cast<int>(sample_count), | 882 static_cast<int>(sample_rate), static_cast<int>(sample_count), |
| 881 GetRoutingID(), client); | 883 GetRoutingID(), client); |
| (...skipping 758 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1640 RenderWidgetFullscreenPepper* container = | 1642 RenderWidgetFullscreenPepper* container = |
| 1641 static_cast<RenderWidgetFullscreenPepper*>( | 1643 static_cast<RenderWidgetFullscreenPepper*>( |
| 1642 instance->fullscreen_container()); | 1644 instance->fullscreen_container()); |
| 1643 return container->mouse_lock_dispatcher(); | 1645 return container->mouse_lock_dispatcher(); |
| 1644 } else { | 1646 } else { |
| 1645 return render_view_->mouse_lock_dispatcher(); | 1647 return render_view_->mouse_lock_dispatcher(); |
| 1646 } | 1648 } |
| 1647 } | 1649 } |
| 1648 | 1650 |
| 1649 } // namespace content | 1651 } // namespace content |
| OLD | NEW |