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 <algorithm> | 7 #include <algorithm> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
12 #include "base/containers/hash_tables.h" | 12 #include "base/containers/hash_tables.h" |
13 #include "base/lazy_instance.h" | 13 #include "base/lazy_instance.h" |
14 #include "base/memory/ptr_util.h" | 14 #include "base/memory/ptr_util.h" |
15 #include "base/metrics/histogram_macros.h" | 15 #include "base/metrics/histogram_macros.h" |
16 #include "base/metrics/user_metrics.h" | 16 #include "base/metrics/user_metrics.h" |
17 #include "base/process/kill.h" | 17 #include "base/process/kill.h" |
18 #include "base/strings/utf_string_conversions.h" | |
whywhat
2017/04/12 16:02:12
nit: don't think you need this
Hzj_jie
2017/04/13 00:38:53
Done.
| |
18 #include "base/time/time.h" | 19 #include "base/time/time.h" |
19 #include "build/build_config.h" | 20 #include "build/build_config.h" |
20 #include "content/browser/accessibility/browser_accessibility_manager.h" | 21 #include "content/browser/accessibility/browser_accessibility_manager.h" |
21 #include "content/browser/accessibility/browser_accessibility_state_impl.h" | 22 #include "content/browser/accessibility/browser_accessibility_state_impl.h" |
22 #include "content/browser/bluetooth/web_bluetooth_service_impl.h" | 23 #include "content/browser/bluetooth/web_bluetooth_service_impl.h" |
23 #include "content/browser/browser_main_loop.h" | 24 #include "content/browser/browser_main_loop.h" |
24 #include "content/browser/child_process_security_policy_impl.h" | 25 #include "content/browser/child_process_security_policy_impl.h" |
25 #include "content/browser/devtools/render_frame_devtools_agent_host.h" | 26 #include "content/browser/devtools/render_frame_devtools_agent_host.h" |
26 #include "content/browser/download/mhtml_generation_manager.h" | 27 #include "content/browser/download/mhtml_generation_manager.h" |
27 #include "content/browser/frame_host/cross_process_frame_connector.h" | 28 #include "content/browser/frame_host/cross_process_frame_connector.h" |
28 #include "content/browser/frame_host/debug_urls.h" | 29 #include "content/browser/frame_host/debug_urls.h" |
29 #include "content/browser/frame_host/frame_tree.h" | 30 #include "content/browser/frame_host/frame_tree.h" |
30 #include "content/browser/frame_host/frame_tree_node.h" | 31 #include "content/browser/frame_host/frame_tree_node.h" |
31 #include "content/browser/frame_host/navigation_entry_impl.h" | 32 #include "content/browser/frame_host/navigation_entry_impl.h" |
32 #include "content/browser/frame_host/navigation_handle_impl.h" | 33 #include "content/browser/frame_host/navigation_handle_impl.h" |
33 #include "content/browser/frame_host/navigation_request.h" | 34 #include "content/browser/frame_host/navigation_request.h" |
34 #include "content/browser/frame_host/navigator.h" | 35 #include "content/browser/frame_host/navigator.h" |
35 #include "content/browser/frame_host/navigator_impl.h" | 36 #include "content/browser/frame_host/navigator_impl.h" |
36 #include "content/browser/frame_host/render_frame_host_delegate.h" | 37 #include "content/browser/frame_host/render_frame_host_delegate.h" |
37 #include "content/browser/frame_host/render_frame_proxy_host.h" | 38 #include "content/browser/frame_host/render_frame_proxy_host.h" |
38 #include "content/browser/frame_host/render_widget_host_view_child_frame.h" | 39 #include "content/browser/frame_host/render_widget_host_view_child_frame.h" |
39 #include "content/browser/installedapp/installed_app_provider_impl_default.h" | 40 #include "content/browser/installedapp/installed_app_provider_impl_default.h" |
41 #include "content/browser/keyboard_lock/keyboard_lock_service_impl.h" | |
40 #include "content/browser/loader/resource_dispatcher_host_impl.h" | 42 #include "content/browser/loader/resource_dispatcher_host_impl.h" |
41 #include "content/browser/media/media_interface_proxy.h" | 43 #include "content/browser/media/media_interface_proxy.h" |
42 #include "content/browser/media/session/media_session_service_impl.h" | 44 #include "content/browser/media/session/media_session_service_impl.h" |
43 #include "content/browser/permissions/permission_service_context.h" | 45 #include "content/browser/permissions/permission_service_context.h" |
44 #include "content/browser/permissions/permission_service_impl.h" | 46 #include "content/browser/permissions/permission_service_impl.h" |
45 #include "content/browser/presentation/presentation_service_impl.h" | 47 #include "content/browser/presentation/presentation_service_impl.h" |
46 #include "content/browser/renderer_host/dip_util.h" | 48 #include "content/browser/renderer_host/dip_util.h" |
47 #include "content/browser/renderer_host/input/input_router_impl.h" | 49 #include "content/browser/renderer_host/input/input_router_impl.h" |
48 #include "content/browser/renderer_host/input/timeout_monitor.h" | 50 #include "content/browser/renderer_host/input/timeout_monitor.h" |
49 #include "content/browser/renderer_host/media/media_devices_dispatcher_host.h" | 51 #include "content/browser/renderer_host/media/media_devices_dispatcher_host.h" |
(...skipping 2502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2552 base::Unretained(media_stream_manager)), | 2554 base::Unretained(media_stream_manager)), |
2553 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); | 2555 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); |
2554 } | 2556 } |
2555 #endif | 2557 #endif |
2556 | 2558 |
2557 #if BUILDFLAG(ENABLE_MEDIA_REMOTING) | 2559 #if BUILDFLAG(ENABLE_MEDIA_REMOTING) |
2558 GetInterfaceRegistry()->AddInterface(base::Bind( | 2560 GetInterfaceRegistry()->AddInterface(base::Bind( |
2559 &RemoterFactoryImpl::Bind, GetProcess()->GetID(), GetRoutingID())); | 2561 &RemoterFactoryImpl::Bind, GetProcess()->GetID(), GetRoutingID())); |
2560 #endif // BUILDFLAG(ENABLE_MEDIA_REMOTING) | 2562 #endif // BUILDFLAG(ENABLE_MEDIA_REMOTING) |
2561 | 2563 |
2564 GetInterfaceRegistry()->AddInterface(base::Bind( | |
2565 &KeyboardLockServiceImpl::CreateMojoService, base::Unretained(this))); | |
2566 | |
2562 GetContentClient()->browser()->RegisterRenderFrameMojoInterfaces( | 2567 GetContentClient()->browser()->RegisterRenderFrameMojoInterfaces( |
2563 GetInterfaceRegistry(), this); | 2568 GetInterfaceRegistry(), this); |
2564 } | 2569 } |
2565 | 2570 |
2566 void RenderFrameHostImpl::ResetWaitingState() { | 2571 void RenderFrameHostImpl::ResetWaitingState() { |
2567 DCHECK(is_active()); | 2572 DCHECK(is_active()); |
2568 | 2573 |
2569 // Whenever we reset the RFH state, we should not be waiting for beforeunload | 2574 // Whenever we reset the RFH state, we should not be waiting for beforeunload |
2570 // or close acks. We clear them here to be safe, since they can cause | 2575 // or close acks. We clear them here to be safe, since they can cause |
2571 // navigations to be ignored in OnDidCommitProvisionalLoad. | 2576 // navigations to be ignored in OnDidCommitProvisionalLoad. |
(...skipping 1126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3698 } | 3703 } |
3699 | 3704 |
3700 void RenderFrameHostImpl::ForwardGetInterfaceToRenderFrame( | 3705 void RenderFrameHostImpl::ForwardGetInterfaceToRenderFrame( |
3701 const std::string& interface_name, | 3706 const std::string& interface_name, |
3702 mojo::ScopedMessagePipeHandle pipe) { | 3707 mojo::ScopedMessagePipeHandle pipe) { |
3703 GetRemoteInterfaces()->GetInterface(interface_name, std::move(pipe)); | 3708 GetRemoteInterfaces()->GetInterface(interface_name, std::move(pipe)); |
3704 } | 3709 } |
3705 #endif | 3710 #endif |
3706 | 3711 |
3707 } // namespace content | 3712 } // namespace content |
OLD | NEW |