| 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_webkitplatformsupport_impl.h" | 5 #include "content/renderer/renderer_webkitplatformsupport_impl.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/file_path.h" | 8 #include "base/file_path.h" |
| 9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
| 10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
| 11 #include "base/platform_file.h" | 11 #include "base/platform_file.h" |
| 12 #include "base/shared_memory.h" | 12 #include "base/shared_memory.h" |
| 13 #include "base/utf_string_conversions.h" | 13 #include "base/utf_string_conversions.h" |
| 14 #include "content/common/database_util.h" | 14 #include "content/common/database_util.h" |
| 15 #include "content/common/fileapi/webblobregistry_impl.h" | 15 #include "content/common/fileapi/webblobregistry_impl.h" |
| 16 #include "content/common/fileapi/webfilesystem_impl.h" | 16 #include "content/common/fileapi/webfilesystem_impl.h" |
| 17 #include "content/common/file_utilities_messages.h" | 17 #include "content/common/file_utilities_messages.h" |
| 18 #include "content/common/indexed_db/proxy_webidbfactory_impl.h" | 18 #include "content/common/indexed_db/proxy_webidbfactory_impl.h" |
| 19 #include "content/common/mime_registry_messages.h" | 19 #include "content/common/mime_registry_messages.h" |
| 20 #include "content/common/npobject_util.h" | 20 #include "content/common/npobject_util.h" |
| 21 #include "content/common/view_messages.h" | 21 #include "content/common/view_messages.h" |
| 22 #include "content/common/webmessageportchannel_impl.h" | 22 #include "content/common/webmessageportchannel_impl.h" |
| 23 #include "content/public/common/content_switches.h" | 23 #include "content/public/common/content_switches.h" |
| 24 #include "content/public/common/gpu_info.h" | 24 #include "content/public/common/gpu_info.h" |
| 25 #include "content/public/renderer/content_renderer_client.h" | 25 #include "content/public/renderer/content_renderer_client.h" |
| 26 #include "content/renderer/dom_storage/webstoragenamespace_impl.h" | 26 #include "content/renderer/dom_storage/webstoragenamespace_impl.h" |
| 27 #include "content/renderer/gamepad_shared_memory_reader.h" | 27 #include "content/renderer/gamepad_shared_memory_reader.h" |
| 28 #include "content/renderer/hyphenator/hyphenator.h" | 28 #include "content/renderer/hyphenator/hyphenator.h" |
| 29 #include "content/renderer/media/audio_hardware.h" | 29 #include "content/renderer/media/audio_hardware.h" |
| 30 #include "content/renderer/media/media_stream_dependency_factory.h" |
| 30 #include "content/renderer/media/renderer_webaudiodevice_impl.h" | 31 #include "content/renderer/media/renderer_webaudiodevice_impl.h" |
| 31 #include "content/renderer/render_thread_impl.h" | 32 #include "content/renderer/render_thread_impl.h" |
| 32 #include "content/renderer/render_view_impl.h" | 33 #include "content/renderer/render_view_impl.h" |
| 33 #include "content/renderer/renderer_clipboard_client.h" | 34 #include "content/renderer/renderer_clipboard_client.h" |
| 34 #include "content/renderer/websharedworkerrepository_impl.h" | 35 #include "content/renderer/websharedworkerrepository_impl.h" |
| 35 #include "googleurl/src/gurl.h" | 36 #include "googleurl/src/gurl.h" |
| 36 #include "ipc/ipc_sync_message_filter.h" | 37 #include "ipc/ipc_sync_message_filter.h" |
| 37 #include "media/audio/audio_output_device.h" | 38 #include "media/audio/audio_output_device.h" |
| 38 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebBlobRegis
try.h" | 39 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebBlobRegis
try.h" |
| 39 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileInfo.h" | 40 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileInfo.h" |
| (...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 669 refresh = false; | 670 refresh = false; |
| 670 RenderThread::Get()->Send( | 671 RenderThread::Get()->Send( |
| 671 new ViewHostMsg_GetPlugins(refresh, plugins)); | 672 new ViewHostMsg_GetPlugins(refresh, plugins)); |
| 672 } | 673 } |
| 673 | 674 |
| 674 //------------------------------------------------------------------------------ | 675 //------------------------------------------------------------------------------ |
| 675 | 676 |
| 676 WebPeerConnection00Handler* | 677 WebPeerConnection00Handler* |
| 677 RendererWebKitPlatformSupportImpl::createPeerConnection00Handler( | 678 RendererWebKitPlatformSupportImpl::createPeerConnection00Handler( |
| 678 WebPeerConnection00HandlerClient* client) { | 679 WebPeerConnection00HandlerClient* client) { |
| 679 WebFrame* web_frame = WebFrame::frameForCurrentContext(); | 680 RenderThreadImpl* render_thread = RenderThreadImpl::current(); |
| 680 if (!web_frame) | 681 DCHECK(render_thread); |
| 682 if (!render_thread) |
| 681 return NULL; | 683 return NULL; |
| 682 RenderViewImpl* render_view = RenderViewImpl::FromWebView(web_frame->view()); | 684 MediaStreamDependencyFactory* rtc_dependency_factory = |
| 683 if (!render_view) | 685 render_thread->GetMediaStreamDependencyFactory(); |
| 684 return NULL; | 686 return rtc_dependency_factory->CreatePeerConnectionHandlerJsep(client); |
| 685 return render_view->CreatePeerConnectionHandlerJsep(client); | |
| 686 } | 687 } |
| 687 | 688 |
| 688 //------------------------------------------------------------------------------ | 689 //------------------------------------------------------------------------------ |
| 689 | 690 |
| 690 WebMediaStreamCenter* | 691 WebMediaStreamCenter* |
| 691 RendererWebKitPlatformSupportImpl::createMediaStreamCenter( | 692 RendererWebKitPlatformSupportImpl::createMediaStreamCenter( |
| 692 WebMediaStreamCenterClient* client) { | 693 WebMediaStreamCenterClient* client) { |
| 693 RenderThreadImpl* render_thread = RenderThreadImpl::current(); | 694 RenderThreadImpl* render_thread = RenderThreadImpl::current(); |
| 694 DCHECK(render_thread); | 695 DCHECK(render_thread); |
| 695 if (!render_thread) | 696 if (!render_thread) |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 734 const char16* characters, | 735 const char16* characters, |
| 735 size_t length, | 736 size_t length, |
| 736 size_t before_index, | 737 size_t before_index, |
| 737 const WebKit::WebString& locale) { | 738 const WebKit::WebString& locale) { |
| 738 // Crash if WebKit calls this function when canHyphenate returns false. | 739 // Crash if WebKit calls this function when canHyphenate returns false. |
| 739 DCHECK(locale.isEmpty() || locale.equals("en-US")); | 740 DCHECK(locale.isEmpty() || locale.equals("en-US")); |
| 740 DCHECK(hyphenator_.get()); | 741 DCHECK(hyphenator_.get()); |
| 741 return hyphenator_->ComputeLastHyphenLocation(string16(characters, length), | 742 return hyphenator_->ComputeLastHyphenLocation(string16(characters, length), |
| 742 before_index); | 743 before_index); |
| 743 } | 744 } |
| OLD | NEW |