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/browser/frame_host/render_frame_host_impl.h" | 5 #include "content/browser/frame_host/render_frame_host_impl.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 #include "content/browser/frame_host/frame_mojo_shell.h" | 29 #include "content/browser/frame_host/frame_mojo_shell.h" |
30 #include "content/browser/frame_host/frame_tree.h" | 30 #include "content/browser/frame_host/frame_tree.h" |
31 #include "content/browser/frame_host/frame_tree_node.h" | 31 #include "content/browser/frame_host/frame_tree_node.h" |
32 #include "content/browser/frame_host/navigation_handle_impl.h" | 32 #include "content/browser/frame_host/navigation_handle_impl.h" |
33 #include "content/browser/frame_host/navigation_request.h" | 33 #include "content/browser/frame_host/navigation_request.h" |
34 #include "content/browser/frame_host/navigator.h" | 34 #include "content/browser/frame_host/navigator.h" |
35 #include "content/browser/frame_host/navigator_impl.h" | 35 #include "content/browser/frame_host/navigator_impl.h" |
36 #include "content/browser/frame_host/render_frame_host_delegate.h" | 36 #include "content/browser/frame_host/render_frame_host_delegate.h" |
37 #include "content/browser/frame_host/render_frame_proxy_host.h" | 37 #include "content/browser/frame_host/render_frame_proxy_host.h" |
38 #include "content/browser/frame_host/render_widget_host_view_child_frame.h" | 38 #include "content/browser/frame_host/render_widget_host_view_child_frame.h" |
| 39 #include "content/browser/frame_service_impl.h" |
39 #include "content/browser/geolocation/geolocation_service_context.h" | 40 #include "content/browser/geolocation/geolocation_service_context.h" |
40 #include "content/browser/loader/resource_dispatcher_host_impl.h" | 41 #include "content/browser/loader/resource_dispatcher_host_impl.h" |
41 #include "content/browser/permissions/permission_service_context.h" | 42 #include "content/browser/permissions/permission_service_context.h" |
42 #include "content/browser/permissions/permission_service_impl.h" | 43 #include "content/browser/permissions/permission_service_impl.h" |
43 #include "content/browser/presentation/presentation_service_impl.h" | 44 #include "content/browser/presentation/presentation_service_impl.h" |
44 #include "content/browser/renderer_host/input/input_router_impl.h" | 45 #include "content/browser/renderer_host/input/input_router_impl.h" |
45 #include "content/browser/renderer_host/input/timeout_monitor.h" | 46 #include "content/browser/renderer_host/input/timeout_monitor.h" |
46 #include "content/browser/renderer_host/render_process_host_impl.h" | 47 #include "content/browser/renderer_host/render_process_host_impl.h" |
47 #include "content/browser/renderer_host/render_view_host_delegate.h" | 48 #include "content/browser/renderer_host/render_view_host_delegate.h" |
48 #include "content/browser/renderer_host/render_view_host_delegate_view.h" | 49 #include "content/browser/renderer_host/render_view_host_delegate_view.h" |
(...skipping 1918 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1967 #if defined(ENABLE_WEBVR) | 1968 #if defined(ENABLE_WEBVR) |
1968 const base::CommandLine& browser_command_line = | 1969 const base::CommandLine& browser_command_line = |
1969 *base::CommandLine::ForCurrentProcess(); | 1970 *base::CommandLine::ForCurrentProcess(); |
1970 | 1971 |
1971 if (browser_command_line.HasSwitch(switches::kEnableWebVR)) { | 1972 if (browser_command_line.HasSwitch(switches::kEnableWebVR)) { |
1972 GetServiceRegistry()->AddService<blink::mojom::VRService>( | 1973 GetServiceRegistry()->AddService<blink::mojom::VRService>( |
1973 base::Bind(&VRDeviceManager::BindRequest)); | 1974 base::Bind(&VRDeviceManager::BindRequest)); |
1974 } | 1975 } |
1975 #endif | 1976 #endif |
1976 | 1977 |
| 1978 GetServiceRegistry()->AddService<mojom::FrameService>(base::Bind( |
| 1979 &FrameServiceImpl::Create, GetProcess()->GetID(), routing_id())); |
| 1980 |
1977 GetContentClient()->browser()->RegisterRenderFrameMojoServices( | 1981 GetContentClient()->browser()->RegisterRenderFrameMojoServices( |
1978 GetServiceRegistry(), this); | 1982 GetServiceRegistry(), this); |
1979 } | 1983 } |
1980 | 1984 |
1981 void RenderFrameHostImpl::ResetWaitingState() { | 1985 void RenderFrameHostImpl::ResetWaitingState() { |
1982 DCHECK(is_active()); | 1986 DCHECK(is_active()); |
1983 | 1987 |
1984 // The active state of the RVH is determined by its main frame, since | 1988 // The active state of the RVH is determined by its main frame, since |
1985 // subframes should have their own widgets. | 1989 // subframes should have their own widgets. |
1986 if (frame_tree_node_->IsMainFrame()) { | 1990 if (frame_tree_node_->IsMainFrame()) { |
(...skipping 807 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2794 // handler after it's destroyed so it can't run after the RFHI is destroyed. | 2798 // handler after it's destroyed so it can't run after the RFHI is destroyed. |
2795 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( | 2799 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( |
2796 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); | 2800 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); |
2797 } | 2801 } |
2798 | 2802 |
2799 void RenderFrameHostImpl::DeleteWebBluetoothService() { | 2803 void RenderFrameHostImpl::DeleteWebBluetoothService() { |
2800 web_bluetooth_service_.reset(); | 2804 web_bluetooth_service_.reset(); |
2801 } | 2805 } |
2802 | 2806 |
2803 } // namespace content | 2807 } // namespace content |
OLD | NEW |