Chromium Code Reviews| 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 1850 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1861 if (!permission_service_context_) | 1861 if (!permission_service_context_) |
| 1862 permission_service_context_.reset(new PermissionServiceContext(this)); | 1862 permission_service_context_.reset(new PermissionServiceContext(this)); |
| 1863 | 1863 |
| 1864 GetServiceRegistry()->AddService<PermissionService>( | 1864 GetServiceRegistry()->AddService<PermissionService>( |
| 1865 base::Bind(&PermissionServiceContext::CreateService, | 1865 base::Bind(&PermissionServiceContext::CreateService, |
| 1866 base::Unretained(permission_service_context_.get()))); | 1866 base::Unretained(permission_service_context_.get()))); |
| 1867 | 1867 |
| 1868 GetServiceRegistry()->AddService(base::Bind( | 1868 GetServiceRegistry()->AddService(base::Bind( |
| 1869 &PresentationServiceImpl::CreateMojoService, base::Unretained(this))); | 1869 &PresentationServiceImpl::CreateMojoService, base::Unretained(this))); |
| 1870 | 1870 |
| 1871 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | |
| 1872 switches::kEnableWebBluetooth)) { | |
| 1873 GetServiceRegistry()->AddService( | |
| 1874 base::Bind(&RenderFrameHostImpl::CreateWebBluetoothService, | |
| 1875 base::Unretained(this))); | |
| 1876 } | |
| 1877 | |
| 1871 if (!frame_mojo_shell_) | 1878 if (!frame_mojo_shell_) |
| 1872 frame_mojo_shell_.reset(new FrameMojoShell(this)); | 1879 frame_mojo_shell_.reset(new FrameMojoShell(this)); |
| 1873 | 1880 |
| 1874 GetServiceRegistry()->AddService<mojo::shell::mojom::Connector>(base::Bind( | 1881 GetServiceRegistry()->AddService<mojo::shell::mojom::Connector>(base::Bind( |
| 1875 &FrameMojoShell::BindRequest, base::Unretained(frame_mojo_shell_.get()))); | 1882 &FrameMojoShell::BindRequest, base::Unretained(frame_mojo_shell_.get()))); |
| 1876 | 1883 |
| 1877 #if defined(ENABLE_WEBVR) | 1884 #if defined(ENABLE_WEBVR) |
| 1878 const base::CommandLine& browser_command_line = | 1885 const base::CommandLine& browser_command_line = |
| 1879 *base::CommandLine::ForCurrentProcess(); | 1886 *base::CommandLine::ForCurrentProcess(); |
| 1880 | 1887 |
| (...skipping 815 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2696 // For the root frame tree node, also store the AXTreeID of the focused frame. | 2703 // For the root frame tree node, also store the AXTreeID of the focused frame. |
| 2697 FrameTreeNode* focused_frame_tree_node = frame_tree_->GetFocusedFrame(); | 2704 FrameTreeNode* focused_frame_tree_node = frame_tree_->GetFocusedFrame(); |
| 2698 if (!focused_frame_tree_node) | 2705 if (!focused_frame_tree_node) |
| 2699 return; | 2706 return; |
| 2700 RenderFrameHostImpl* focused_frame = | 2707 RenderFrameHostImpl* focused_frame = |
| 2701 focused_frame_tree_node->current_frame_host(); | 2708 focused_frame_tree_node->current_frame_host(); |
| 2702 DCHECK(focused_frame); | 2709 DCHECK(focused_frame); |
| 2703 dst->focused_tree_id = focused_frame->GetAXTreeID(); | 2710 dst->focused_tree_id = focused_frame->GetAXTreeID(); |
| 2704 } | 2711 } |
| 2705 | 2712 |
| 2713 void RenderFrameHostImpl::CreateWebBluetoothService( | |
| 2714 blink::mojom::WebBluetoothServiceRequest request) { | |
| 2715 web_bluetooth_service_.reset( | |
|
Jeffrey Yasskin
2016/03/29 20:30:02
Should we DCHECK that web_bluetooth_service_ hasn'
ortuno
2016/03/29 22:14:04
Done.
| |
| 2716 new WebBluetoothServiceImpl(this, std::move(request))); | |
| 2717 } | |
| 2718 | |
| 2706 } // namespace content | 2719 } // namespace content |
| OLD | NEW |