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 1924 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1935 frame_mojo_shell_.reset(new FrameMojoShell(this)); | 1935 frame_mojo_shell_.reset(new FrameMojoShell(this)); |
1936 | 1936 |
1937 GetServiceRegistry()->AddService<shell::mojom::Connector>(base::Bind( | 1937 GetServiceRegistry()->AddService<shell::mojom::Connector>(base::Bind( |
1938 &FrameMojoShell::BindRequest, base::Unretained(frame_mojo_shell_.get()))); | 1938 &FrameMojoShell::BindRequest, base::Unretained(frame_mojo_shell_.get()))); |
1939 | 1939 |
1940 #if defined(ENABLE_WEBVR) | 1940 #if defined(ENABLE_WEBVR) |
1941 const base::CommandLine& browser_command_line = | 1941 const base::CommandLine& browser_command_line = |
1942 *base::CommandLine::ForCurrentProcess(); | 1942 *base::CommandLine::ForCurrentProcess(); |
1943 | 1943 |
1944 if (browser_command_line.HasSwitch(switches::kEnableWebVR)) { | 1944 if (browser_command_line.HasSwitch(switches::kEnableWebVR)) { |
1945 GetServiceRegistry()->AddService(base::Bind(&VRDeviceManager::BindRequest)); | 1945 GetServiceRegistry()->AddService<blink::mojom::VRService>( |
dcheng
2016/04/28 19:59:44
Why does this template argument need to be specifi
| |
1946 base::Bind(&VRDeviceManager::BindRequest)); | |
1946 } | 1947 } |
1947 #endif | 1948 #endif |
1948 | 1949 |
1949 GetContentClient()->browser()->RegisterRenderFrameMojoServices( | 1950 GetContentClient()->browser()->RegisterRenderFrameMojoServices( |
1950 GetServiceRegistry(), this); | 1951 GetServiceRegistry(), this); |
1951 } | 1952 } |
1952 | 1953 |
1953 void RenderFrameHostImpl::ResetWaitingState() { | 1954 void RenderFrameHostImpl::ResetWaitingState() { |
1954 DCHECK(is_active()); | 1955 DCHECK(is_active()); |
1955 | 1956 |
(...skipping 810 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2766 // handler after it's destroyed so it can't run after the RFHI is destroyed. | 2767 // handler after it's destroyed so it can't run after the RFHI is destroyed. |
2767 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( | 2768 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( |
2768 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); | 2769 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); |
2769 } | 2770 } |
2770 | 2771 |
2771 void RenderFrameHostImpl::DeleteWebBluetoothService() { | 2772 void RenderFrameHostImpl::DeleteWebBluetoothService() { |
2772 web_bluetooth_service_.reset(); | 2773 web_bluetooth_service_.reset(); |
2773 } | 2774 } |
2774 | 2775 |
2775 } // namespace content | 2776 } // namespace content |
OLD | NEW |