| 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 2007 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2018 frame_mojo_shell_.reset(new FrameMojoShell(this)); | 2018 frame_mojo_shell_.reset(new FrameMojoShell(this)); |
| 2019 | 2019 |
| 2020 GetServiceRegistry()->AddService<shell::mojom::Connector>(base::Bind( | 2020 GetServiceRegistry()->AddService<shell::mojom::Connector>(base::Bind( |
| 2021 &FrameMojoShell::BindRequest, base::Unretained(frame_mojo_shell_.get()))); | 2021 &FrameMojoShell::BindRequest, base::Unretained(frame_mojo_shell_.get()))); |
| 2022 | 2022 |
| 2023 #if defined(ENABLE_WEBVR) | 2023 #if defined(ENABLE_WEBVR) |
| 2024 const base::CommandLine& browser_command_line = | 2024 const base::CommandLine& browser_command_line = |
| 2025 *base::CommandLine::ForCurrentProcess(); | 2025 *base::CommandLine::ForCurrentProcess(); |
| 2026 | 2026 |
| 2027 if (browser_command_line.HasSwitch(switches::kEnableWebVR)) { | 2027 if (browser_command_line.HasSwitch(switches::kEnableWebVR)) { |
| 2028 GetServiceRegistry()->AddService<blink::mojom::VRService>( | 2028 GetServiceRegistry()->AddService<device::VRService>( |
| 2029 base::Bind(&device::VRDeviceManager::BindRequest)); | 2029 base::Bind(&device::VRDeviceManager::BindRequest)); |
| 2030 } | 2030 } |
| 2031 #endif | 2031 #endif |
| 2032 | 2032 |
| 2033 GetContentClient()->browser()->RegisterRenderFrameMojoServices( | 2033 GetContentClient()->browser()->RegisterRenderFrameMojoServices( |
| 2034 GetServiceRegistry(), this); | 2034 GetServiceRegistry(), this); |
| 2035 } | 2035 } |
| 2036 | 2036 |
| 2037 void RenderFrameHostImpl::ResetWaitingState() { | 2037 void RenderFrameHostImpl::ResetWaitingState() { |
| 2038 DCHECK(is_active()); | 2038 DCHECK(is_active()); |
| (...skipping 819 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2858 // handler after it's destroyed so it can't run after the RFHI is destroyed. | 2858 // handler after it's destroyed so it can't run after the RFHI is destroyed. |
| 2859 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( | 2859 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( |
| 2860 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); | 2860 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); |
| 2861 } | 2861 } |
| 2862 | 2862 |
| 2863 void RenderFrameHostImpl::DeleteWebBluetoothService() { | 2863 void RenderFrameHostImpl::DeleteWebBluetoothService() { |
| 2864 web_bluetooth_service_.reset(); | 2864 web_bluetooth_service_.reset(); |
| 2865 } | 2865 } |
| 2866 | 2866 |
| 2867 } // namespace content | 2867 } // namespace content |
| OLD | NEW |