| 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" | 20 #include "base/thread_task_runner_handle.h" |
| 21 #include "base/time/time.h" | 21 #include "base/time/time.h" |
| 22 #include "cc/base/switches.h" | 22 #include "cc/base/switches.h" |
| 23 #include "content/child/appcache/appcache_dispatcher.h" | 23 #include "content/child/appcache/appcache_dispatcher.h" |
| 24 #include "content/child/bluetooth/web_bluetooth_impl.h" |
| 24 #include "content/child/permissions/permission_dispatcher.h" | 25 #include "content/child/permissions/permission_dispatcher.h" |
| 25 #include "content/child/plugin_messages.h" | 26 #include "content/child/plugin_messages.h" |
| 26 #include "content/child/quota_dispatcher.h" | 27 #include "content/child/quota_dispatcher.h" |
| 27 #include "content/child/request_extra_data.h" | 28 #include "content/child/request_extra_data.h" |
| 28 #include "content/child/service_worker/service_worker_handle_reference.h" | 29 #include "content/child/service_worker/service_worker_handle_reference.h" |
| 29 #include "content/child/service_worker/service_worker_network_provider.h" | 30 #include "content/child/service_worker/service_worker_network_provider.h" |
| 30 #include "content/child/service_worker/service_worker_provider_context.h" | 31 #include "content/child/service_worker/service_worker_provider_context.h" |
| 31 #include "content/child/service_worker/web_service_worker_provider_impl.h" | 32 #include "content/child/service_worker/web_service_worker_provider_impl.h" |
| 32 #include "content/child/v8_value_converter_impl.h" | 33 #include "content/child/v8_value_converter_impl.h" |
| 33 #include "content/child/web_url_loader_impl.h" | 34 #include "content/child/web_url_loader_impl.h" |
| (...skipping 3772 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3806 | 3807 |
| 3807 void RenderFrameImpl::unregisterProtocolHandler(const WebString& scheme, | 3808 void RenderFrameImpl::unregisterProtocolHandler(const WebString& scheme, |
| 3808 const WebURL& url) { | 3809 const WebURL& url) { |
| 3809 bool user_gesture = WebUserGestureIndicator::isProcessingUserGesture(); | 3810 bool user_gesture = WebUserGestureIndicator::isProcessingUserGesture(); |
| 3810 Send(new FrameHostMsg_UnregisterProtocolHandler(routing_id_, | 3811 Send(new FrameHostMsg_UnregisterProtocolHandler(routing_id_, |
| 3811 base::UTF16ToUTF8(scheme), | 3812 base::UTF16ToUTF8(scheme), |
| 3812 url, | 3813 url, |
| 3813 user_gesture)); | 3814 user_gesture)); |
| 3814 } | 3815 } |
| 3815 | 3816 |
| 3817 blink::WebBluetooth* RenderFrameImpl::bluetooth() { |
| 3818 if (!bluetooth_) { |
| 3819 bluetooth_.reset(new WebBluetoothImpl( |
| 3820 ChildThreadImpl::current()->thread_safe_sender(), routing_id_)); |
| 3821 } |
| 3822 |
| 3823 return bluetooth_.get(); |
| 3824 } |
| 3825 |
| 3816 #if defined(ENABLE_WEBVR) | 3826 #if defined(ENABLE_WEBVR) |
| 3817 blink::WebVRClient* RenderFrameImpl::webVRClient() { | 3827 blink::WebVRClient* RenderFrameImpl::webVRClient() { |
| 3818 if (!vr_dispatcher_) | 3828 if (!vr_dispatcher_) |
| 3819 vr_dispatcher_.reset(new VRDispatcher(GetServiceRegistry())); | 3829 vr_dispatcher_.reset(new VRDispatcher(GetServiceRegistry())); |
| 3820 | 3830 |
| 3821 return vr_dispatcher_.get(); | 3831 return vr_dispatcher_.get(); |
| 3822 } | 3832 } |
| 3823 #endif | 3833 #endif |
| 3824 | 3834 |
| 3825 void RenderFrameImpl::DidPlay(WebMediaPlayer* player) { | 3835 void RenderFrameImpl::DidPlay(WebMediaPlayer* player) { |
| (...skipping 1235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5061 void RenderFrameImpl::RegisterMojoServices() { | 5071 void RenderFrameImpl::RegisterMojoServices() { |
| 5062 // Only main frame have ImageDownloader service. | 5072 // Only main frame have ImageDownloader service. |
| 5063 if (!frame_->parent()) { | 5073 if (!frame_->parent()) { |
| 5064 GetServiceRegistry()->AddService<image_downloader::ImageDownloader>( | 5074 GetServiceRegistry()->AddService<image_downloader::ImageDownloader>( |
| 5065 base::Bind(&ImageDownloaderImpl::CreateMojoService, | 5075 base::Bind(&ImageDownloaderImpl::CreateMojoService, |
| 5066 base::Unretained(this))); | 5076 base::Unretained(this))); |
| 5067 } | 5077 } |
| 5068 } | 5078 } |
| 5069 | 5079 |
| 5070 } // namespace content | 5080 } // namespace content |
| OLD | NEW |