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 1849 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1860 if (!permission_service_context_) | 1860 if (!permission_service_context_) |
1861 permission_service_context_.reset(new PermissionServiceContext(this)); | 1861 permission_service_context_.reset(new PermissionServiceContext(this)); |
1862 | 1862 |
1863 GetServiceRegistry()->AddService<mojom::PermissionService>( | 1863 GetServiceRegistry()->AddService<mojom::PermissionService>( |
1864 base::Bind(&PermissionServiceContext::CreateService, | 1864 base::Bind(&PermissionServiceContext::CreateService, |
1865 base::Unretained(permission_service_context_.get()))); | 1865 base::Unretained(permission_service_context_.get()))); |
1866 | 1866 |
1867 GetServiceRegistry()->AddService(base::Bind( | 1867 GetServiceRegistry()->AddService(base::Bind( |
1868 &PresentationServiceImpl::CreateMojoService, base::Unretained(this))); | 1868 &PresentationServiceImpl::CreateMojoService, base::Unretained(this))); |
1869 | 1869 |
1870 if (!frame_mojo_shell_) | 1870 if (!frame_mojo_shell_) { |
1871 frame_mojo_shell_.reset(new FrameMojoShell(this)); | 1871 frame_mojo_shell_.reset( |
| 1872 new FrameMojoShell(this, permission_service_context_.get())); |
| 1873 } |
1872 | 1874 |
1873 GetServiceRegistry()->AddService<mojo::shell::mojom::Connector>(base::Bind( | 1875 GetServiceRegistry()->AddService<mojo::shell::mojom::Connector>(base::Bind( |
1874 &FrameMojoShell::BindRequest, base::Unretained(frame_mojo_shell_.get()))); | 1876 &FrameMojoShell::BindRequest, base::Unretained(frame_mojo_shell_.get()))); |
1875 | 1877 |
1876 #if defined(ENABLE_WEBVR) | 1878 #if defined(ENABLE_WEBVR) |
1877 const base::CommandLine& browser_command_line = | 1879 const base::CommandLine& browser_command_line = |
1878 *base::CommandLine::ForCurrentProcess(); | 1880 *base::CommandLine::ForCurrentProcess(); |
1879 | 1881 |
1880 if (browser_command_line.HasSwitch(switches::kEnableWebVR)) { | 1882 if (browser_command_line.HasSwitch(switches::kEnableWebVR)) { |
1881 GetServiceRegistry()->AddService(base::Bind(&VRDeviceManager::BindRequest)); | 1883 GetServiceRegistry()->AddService(base::Bind(&VRDeviceManager::BindRequest)); |
(...skipping 813 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2695 FrameTreeNode* focused_frame_tree_node = frame_tree_->GetFocusedFrame(); | 2697 FrameTreeNode* focused_frame_tree_node = frame_tree_->GetFocusedFrame(); |
2696 if (!focused_frame_tree_node) | 2698 if (!focused_frame_tree_node) |
2697 return; | 2699 return; |
2698 RenderFrameHostImpl* focused_frame = | 2700 RenderFrameHostImpl* focused_frame = |
2699 focused_frame_tree_node->current_frame_host(); | 2701 focused_frame_tree_node->current_frame_host(); |
2700 DCHECK(focused_frame); | 2702 DCHECK(focused_frame); |
2701 dst->focused_tree_id = focused_frame->GetAXTreeID(); | 2703 dst->focused_tree_id = focused_frame->GetAXTreeID(); |
2702 } | 2704 } |
2703 | 2705 |
2704 } // namespace content | 2706 } // namespace content |
OLD | NEW |