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" |
11 #include "base/containers/hash_tables.h" | 11 #include "base/containers/hash_tables.h" |
12 #include "base/lazy_instance.h" | 12 #include "base/lazy_instance.h" |
13 #include "base/metrics/histogram.h" | 13 #include "base/metrics/histogram.h" |
14 #include "base/process/kill.h" | 14 #include "base/process/kill.h" |
15 #include "base/time/time.h" | 15 #include "base/time/time.h" |
16 #include "build/build_config.h" | 16 #include "build/build_config.h" |
17 #include "content/browser/accessibility/accessibility_mode_helper.h" | 17 #include "content/browser/accessibility/accessibility_mode_helper.h" |
18 #include "content/browser/accessibility/ax_tree_id_registry.h" | 18 #include "content/browser/accessibility/ax_tree_id_registry.h" |
19 #include "content/browser/accessibility/browser_accessibility_manager.h" | 19 #include "content/browser/accessibility/browser_accessibility_manager.h" |
20 #include "content/browser/accessibility/browser_accessibility_state_impl.h" | 20 #include "content/browser/accessibility/browser_accessibility_state_impl.h" |
21 #include "content/browser/ballista/ballista_service_impl.h" | |
21 #include "content/browser/child_process_security_policy_impl.h" | 22 #include "content/browser/child_process_security_policy_impl.h" |
22 #include "content/browser/child_process_security_policy_impl.h" | 23 #include "content/browser/child_process_security_policy_impl.h" |
23 #include "content/browser/devtools/render_frame_devtools_agent_host.h" | 24 #include "content/browser/devtools/render_frame_devtools_agent_host.h" |
24 #include "content/browser/download/mhtml_generation_manager.h" | 25 #include "content/browser/download/mhtml_generation_manager.h" |
25 #include "content/browser/frame_host/cross_process_frame_connector.h" | 26 #include "content/browser/frame_host/cross_process_frame_connector.h" |
26 #include "content/browser/frame_host/cross_site_transferring_request.h" | 27 #include "content/browser/frame_host/cross_site_transferring_request.h" |
27 #include "content/browser/frame_host/frame_mojo_shell.h" | 28 #include "content/browser/frame_host/frame_mojo_shell.h" |
28 #include "content/browser/frame_host/frame_tree.h" | 29 #include "content/browser/frame_host/frame_tree.h" |
29 #include "content/browser/frame_host/frame_tree_node.h" | 30 #include "content/browser/frame_host/frame_tree_node.h" |
30 #include "content/browser/frame_host/navigation_handle_impl.h" | 31 #include "content/browser/frame_host/navigation_handle_impl.h" |
(...skipping 1844 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1875 #if defined(ENABLE_WEBVR) | 1876 #if defined(ENABLE_WEBVR) |
1876 const base::CommandLine& browser_command_line = | 1877 const base::CommandLine& browser_command_line = |
1877 *base::CommandLine::ForCurrentProcess(); | 1878 *base::CommandLine::ForCurrentProcess(); |
1878 | 1879 |
1879 if (browser_command_line.HasSwitch(switches::kEnableWebVR)) { | 1880 if (browser_command_line.HasSwitch(switches::kEnableWebVR)) { |
1880 GetServiceRegistry()->AddService<VRService>( | 1881 GetServiceRegistry()->AddService<VRService>( |
1881 base::Bind(&VRDeviceManager::BindRequest)); | 1882 base::Bind(&VRDeviceManager::BindRequest)); |
1882 } | 1883 } |
1883 #endif | 1884 #endif |
1884 | 1885 |
1886 // TODO(mgiuca): This doesn't seem to be used (instead, the one in | |
Sam McNally
2016/04/01 02:51:25
https://codereview.chromium.org/1830883002/ will l
Matt Giuca
2016/04/12 06:12:21
Done.
| |
1887 // RenderProcessHostImpl). | |
1888 // TODO(mgiuca): Only add this if #experimental-web-platform-features is | |
1889 // enabled. | |
1890 GetServiceRegistry()->AddService(base::Bind( | |
1891 &BallistaServiceImpl::Create, GetProcess()->GetBrowserContext())); | |
1892 | |
1885 GetContentClient()->browser()->RegisterRenderFrameMojoServices( | 1893 GetContentClient()->browser()->RegisterRenderFrameMojoServices( |
1886 GetServiceRegistry(), this); | 1894 GetServiceRegistry(), this); |
1887 } | 1895 } |
1888 | 1896 |
1889 void RenderFrameHostImpl::SetState(RenderFrameHostImplState rfh_state) { | 1897 void RenderFrameHostImpl::SetState(RenderFrameHostImplState rfh_state) { |
1890 // Only main frames should be swapped out and retained inside a proxy host. | 1898 // Only main frames should be swapped out and retained inside a proxy host. |
1891 if (rfh_state == STATE_SWAPPED_OUT) | 1899 if (rfh_state == STATE_SWAPPED_OUT) |
1892 CHECK(!GetParent()); | 1900 CHECK(!GetParent()); |
1893 | 1901 |
1894 // We update the number of RenderFrameHosts in a SiteInstance when the swapped | 1902 // We update the number of RenderFrameHosts in a SiteInstance when the swapped |
(...skipping 811 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2706 FrameTreeNode* focused_frame_tree_node = frame_tree_->GetFocusedFrame(); | 2714 FrameTreeNode* focused_frame_tree_node = frame_tree_->GetFocusedFrame(); |
2707 if (!focused_frame_tree_node) | 2715 if (!focused_frame_tree_node) |
2708 return; | 2716 return; |
2709 RenderFrameHostImpl* focused_frame = | 2717 RenderFrameHostImpl* focused_frame = |
2710 focused_frame_tree_node->current_frame_host(); | 2718 focused_frame_tree_node->current_frame_host(); |
2711 DCHECK(focused_frame); | 2719 DCHECK(focused_frame); |
2712 dst->focused_tree_id = focused_frame->GetAXTreeID(); | 2720 dst->focused_tree_id = focused_frame->GetAXTreeID(); |
2713 } | 2721 } |
2714 | 2722 |
2715 } // namespace content | 2723 } // namespace content |
OLD | NEW |