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" |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 #include "content/public/common/url_constants.h" | 53 #include "content/public/common/url_constants.h" |
54 #include "content/public/common/url_utils.h" | 54 #include "content/public/common/url_utils.h" |
55 #include "content/public/renderer/browser_plugin_delegate.h" | 55 #include "content/public/renderer/browser_plugin_delegate.h" |
56 #include "content/public/renderer/content_renderer_client.h" | 56 #include "content/public/renderer/content_renderer_client.h" |
57 #include "content/public/renderer/context_menu_client.h" | 57 #include "content/public/renderer/context_menu_client.h" |
58 #include "content/public/renderer/document_state.h" | 58 #include "content/public/renderer/document_state.h" |
59 #include "content/public/renderer/navigation_state.h" | 59 #include "content/public/renderer/navigation_state.h" |
60 #include "content/public/renderer/render_frame_observer.h" | 60 #include "content/public/renderer/render_frame_observer.h" |
61 #include "content/public/renderer/renderer_ppapi_host.h" | 61 #include "content/public/renderer/renderer_ppapi_host.h" |
62 #include "content/renderer/accessibility/renderer_accessibility.h" | 62 #include "content/renderer/accessibility/renderer_accessibility.h" |
| 63 #include "content/renderer/bluetooth/web_bluetooth_impl.h" |
63 #include "content/renderer/browser_plugin/browser_plugin.h" | 64 #include "content/renderer/browser_plugin/browser_plugin.h" |
64 #include "content/renderer/browser_plugin/browser_plugin_manager.h" | 65 #include "content/renderer/browser_plugin/browser_plugin_manager.h" |
65 #include "content/renderer/child_frame_compositing_helper.h" | 66 #include "content/renderer/child_frame_compositing_helper.h" |
66 #include "content/renderer/context_menu_params_builder.h" | 67 #include "content/renderer/context_menu_params_builder.h" |
67 #include "content/renderer/devtools/devtools_agent.h" | 68 #include "content/renderer/devtools/devtools_agent.h" |
68 #include "content/renderer/dom_automation_controller.h" | 69 #include "content/renderer/dom_automation_controller.h" |
69 #include "content/renderer/external_popup_menu.h" | 70 #include "content/renderer/external_popup_menu.h" |
70 #include "content/renderer/geolocation_dispatcher.h" | 71 #include "content/renderer/geolocation_dispatcher.h" |
71 #include "content/renderer/gpu/gpu_benchmarking_extension.h" | 72 #include "content/renderer/gpu/gpu_benchmarking_extension.h" |
72 #include "content/renderer/history_controller.h" | 73 #include "content/renderer/history_controller.h" |
(...skipping 3723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3796 | 3797 |
3797 void RenderFrameImpl::unregisterProtocolHandler(const WebString& scheme, | 3798 void RenderFrameImpl::unregisterProtocolHandler(const WebString& scheme, |
3798 const WebURL& url) { | 3799 const WebURL& url) { |
3799 bool user_gesture = WebUserGestureIndicator::isProcessingUserGesture(); | 3800 bool user_gesture = WebUserGestureIndicator::isProcessingUserGesture(); |
3800 Send(new FrameHostMsg_UnregisterProtocolHandler(routing_id_, | 3801 Send(new FrameHostMsg_UnregisterProtocolHandler(routing_id_, |
3801 base::UTF16ToUTF8(scheme), | 3802 base::UTF16ToUTF8(scheme), |
3802 url, | 3803 url, |
3803 user_gesture)); | 3804 user_gesture)); |
3804 } | 3805 } |
3805 | 3806 |
| 3807 blink::WebBluetooth* RenderFrameImpl::bluetooth() { |
| 3808 if (!bluetooth_) { |
| 3809 bluetooth_.reset( |
| 3810 new WebBluetoothImpl(ChildThreadImpl::current()->thread_safe_sender())); |
| 3811 } |
| 3812 |
| 3813 return bluetooth_.get(); |
| 3814 } |
| 3815 |
3806 #if defined(ENABLE_WEBVR) | 3816 #if defined(ENABLE_WEBVR) |
3807 blink::WebVRClient* RenderFrameImpl::webVRClient() { | 3817 blink::WebVRClient* RenderFrameImpl::webVRClient() { |
3808 if (!vr_dispatcher_) | 3818 if (!vr_dispatcher_) |
3809 vr_dispatcher_.reset(new VRDispatcher(GetServiceRegistry())); | 3819 vr_dispatcher_.reset(new VRDispatcher(GetServiceRegistry())); |
3810 | 3820 |
3811 return vr_dispatcher_.get(); | 3821 return vr_dispatcher_.get(); |
3812 } | 3822 } |
3813 #endif | 3823 #endif |
3814 | 3824 |
3815 void RenderFrameImpl::DidPlay(WebMediaPlayer* player) { | 3825 void RenderFrameImpl::DidPlay(WebMediaPlayer* player) { |
(...skipping 1218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5034 void RenderFrameImpl::RegisterMojoServices() { | 5044 void RenderFrameImpl::RegisterMojoServices() { |
5035 // Only main frame have ImageDownloader service. | 5045 // Only main frame have ImageDownloader service. |
5036 if (!frame_->parent()) { | 5046 if (!frame_->parent()) { |
5037 GetServiceRegistry()->AddService<image_downloader::ImageDownloader>( | 5047 GetServiceRegistry()->AddService<image_downloader::ImageDownloader>( |
5038 base::Bind(&ImageDownloaderImpl::CreateMojoService, | 5048 base::Bind(&ImageDownloaderImpl::CreateMojoService, |
5039 base::Unretained(this))); | 5049 base::Unretained(this))); |
5040 } | 5050 } |
5041 } | 5051 } |
5042 | 5052 |
5043 } // namespace content | 5053 } // namespace content |
OLD | NEW |