| 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 1848 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1859 if (!permission_service_context_) | 1859 if (!permission_service_context_) |
| 1860 permission_service_context_.reset(new PermissionServiceContext(this)); | 1860 permission_service_context_.reset(new PermissionServiceContext(this)); |
| 1861 | 1861 |
| 1862 GetServiceRegistry()->AddService<PermissionService>( | 1862 GetServiceRegistry()->AddService<PermissionService>( |
| 1863 base::Bind(&PermissionServiceContext::CreateService, | 1863 base::Bind(&PermissionServiceContext::CreateService, |
| 1864 base::Unretained(permission_service_context_.get()))); | 1864 base::Unretained(permission_service_context_.get()))); |
| 1865 | 1865 |
| 1866 GetServiceRegistry()->AddService(base::Bind( | 1866 GetServiceRegistry()->AddService(base::Bind( |
| 1867 &PresentationServiceImpl::CreateMojoService, base::Unretained(this))); | 1867 &PresentationServiceImpl::CreateMojoService, base::Unretained(this))); |
| 1868 | 1868 |
| 1869 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 1870 switches::kEnableWebBluetooth)) { |
| 1871 GetServiceRegistry()->AddService( |
| 1872 base::Bind(&RenderFrameHostImpl::CreateWebBluetoothService, |
| 1873 base::Unretained(this))); |
| 1874 } |
| 1875 |
| 1869 if (!frame_mojo_shell_) | 1876 if (!frame_mojo_shell_) |
| 1870 frame_mojo_shell_.reset(new FrameMojoShell(this)); | 1877 frame_mojo_shell_.reset(new FrameMojoShell(this)); |
| 1871 | 1878 |
| 1872 GetServiceRegistry()->AddService<mojo::shell::mojom::Connector>(base::Bind( | 1879 GetServiceRegistry()->AddService<mojo::shell::mojom::Connector>(base::Bind( |
| 1873 &FrameMojoShell::BindRequest, base::Unretained(frame_mojo_shell_.get()))); | 1880 &FrameMojoShell::BindRequest, base::Unretained(frame_mojo_shell_.get()))); |
| 1874 | 1881 |
| 1875 #if defined(ENABLE_WEBVR) | 1882 #if defined(ENABLE_WEBVR) |
| 1876 const base::CommandLine& browser_command_line = | 1883 const base::CommandLine& browser_command_line = |
| 1877 *base::CommandLine::ForCurrentProcess(); | 1884 *base::CommandLine::ForCurrentProcess(); |
| 1878 | 1885 |
| (...skipping 826 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2705 // For the root frame tree node, also store the AXTreeID of the focused frame. | 2712 // For the root frame tree node, also store the AXTreeID of the focused frame. |
| 2706 FrameTreeNode* focused_frame_tree_node = frame_tree_->GetFocusedFrame(); | 2713 FrameTreeNode* focused_frame_tree_node = frame_tree_->GetFocusedFrame(); |
| 2707 if (!focused_frame_tree_node) | 2714 if (!focused_frame_tree_node) |
| 2708 return; | 2715 return; |
| 2709 RenderFrameHostImpl* focused_frame = | 2716 RenderFrameHostImpl* focused_frame = |
| 2710 focused_frame_tree_node->current_frame_host(); | 2717 focused_frame_tree_node->current_frame_host(); |
| 2711 DCHECK(focused_frame); | 2718 DCHECK(focused_frame); |
| 2712 dst->focused_tree_id = focused_frame->GetAXTreeID(); | 2719 dst->focused_tree_id = focused_frame->GetAXTreeID(); |
| 2713 } | 2720 } |
| 2714 | 2721 |
| 2722 void RenderFrameHostImpl::CreateWebBluetoothService( |
| 2723 blink::mojom::WebBluetoothServiceRequest request) { |
| 2724 web_bluetooth_service_.reset( |
| 2725 new WebBluetoothServiceImpl(this, std::move(request))); |
| 2726 } |
| 2727 |
| 2715 } // namespace content | 2728 } // namespace content |
| OLD | NEW |