| 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 1929 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1940 frame_mojo_shell_.reset(new FrameMojoShell(this)); | 1940 frame_mojo_shell_.reset(new FrameMojoShell(this)); |
| 1941 | 1941 |
| 1942 GetServiceRegistry()->AddService<shell::mojom::Connector>(base::Bind( | 1942 GetServiceRegistry()->AddService<shell::mojom::Connector>(base::Bind( |
| 1943 &FrameMojoShell::BindRequest, base::Unretained(frame_mojo_shell_.get()))); | 1943 &FrameMojoShell::BindRequest, base::Unretained(frame_mojo_shell_.get()))); |
| 1944 | 1944 |
| 1945 #if defined(ENABLE_WEBVR) | 1945 #if defined(ENABLE_WEBVR) |
| 1946 const base::CommandLine& browser_command_line = | 1946 const base::CommandLine& browser_command_line = |
| 1947 *base::CommandLine::ForCurrentProcess(); | 1947 *base::CommandLine::ForCurrentProcess(); |
| 1948 | 1948 |
| 1949 if (browser_command_line.HasSwitch(switches::kEnableWebVR)) { | 1949 if (browser_command_line.HasSwitch(switches::kEnableWebVR)) { |
| 1950 GetServiceRegistry()->AddService(base::Bind(&VRDeviceManager::BindRequest)); | 1950 GetServiceRegistry()->AddService<blink::mojom::VRService>( |
| 1951 base::Bind(&VRDeviceManager::BindRequest)); |
| 1951 } | 1952 } |
| 1952 #endif | 1953 #endif |
| 1953 | 1954 |
| 1954 GetContentClient()->browser()->RegisterRenderFrameMojoServices( | 1955 GetContentClient()->browser()->RegisterRenderFrameMojoServices( |
| 1955 GetServiceRegistry(), this); | 1956 GetServiceRegistry(), this); |
| 1956 } | 1957 } |
| 1957 | 1958 |
| 1958 void RenderFrameHostImpl::ResetWaitingState() { | 1959 void RenderFrameHostImpl::ResetWaitingState() { |
| 1959 DCHECK(is_active()); | 1960 DCHECK(is_active()); |
| 1960 | 1961 |
| (...skipping 810 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2771 // handler after it's destroyed so it can't run after the RFHI is destroyed. | 2772 // handler after it's destroyed so it can't run after the RFHI is destroyed. |
| 2772 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( | 2773 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( |
| 2773 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); | 2774 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); |
| 2774 } | 2775 } |
| 2775 | 2776 |
| 2776 void RenderFrameHostImpl::DeleteWebBluetoothService() { | 2777 void RenderFrameHostImpl::DeleteWebBluetoothService() { |
| 2777 web_bluetooth_service_.reset(); | 2778 web_bluetooth_service_.reset(); |
| 2778 } | 2779 } |
| 2779 | 2780 |
| 2780 } // namespace content | 2781 } // namespace content |
| OLD | NEW |