Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(140)

Side by Side Diff: content/browser/frame_host/render_frame_host_impl.cc

Issue 1808203005: [OnionSoup] Moving VR service from content to Blink (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase to ToT! Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/browser/DEPS ('k') | content/browser/vr/android/cardboard/cardboard_vr_device.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1921 matching lines...) Expand 10 before | Expand all | Expand 10 after
1932 frame_mojo_shell_.reset(new FrameMojoShell(this)); 1932 frame_mojo_shell_.reset(new FrameMojoShell(this));
1933 1933
1934 GetServiceRegistry()->AddService<shell::mojom::Connector>(base::Bind( 1934 GetServiceRegistry()->AddService<shell::mojom::Connector>(base::Bind(
1935 &FrameMojoShell::BindRequest, base::Unretained(frame_mojo_shell_.get()))); 1935 &FrameMojoShell::BindRequest, base::Unretained(frame_mojo_shell_.get())));
1936 1936
1937 #if defined(ENABLE_WEBVR) 1937 #if defined(ENABLE_WEBVR)
1938 const base::CommandLine& browser_command_line = 1938 const base::CommandLine& browser_command_line =
1939 *base::CommandLine::ForCurrentProcess(); 1939 *base::CommandLine::ForCurrentProcess();
1940 1940
1941 if (browser_command_line.HasSwitch(switches::kEnableWebVR)) { 1941 if (browser_command_line.HasSwitch(switches::kEnableWebVR)) {
1942 GetServiceRegistry()->AddService(base::Bind(&VRDeviceManager::BindRequest)); 1942 GetServiceRegistry()->AddService<blink::mojom::VRService>(
1943 base::Bind(&VRDeviceManager::BindRequest));
1943 } 1944 }
1944 #endif 1945 #endif
1945 1946
1946 GetContentClient()->browser()->RegisterRenderFrameMojoServices( 1947 GetContentClient()->browser()->RegisterRenderFrameMojoServices(
1947 GetServiceRegistry(), this); 1948 GetServiceRegistry(), this);
1948 } 1949 }
1949 1950
1950 void RenderFrameHostImpl::ResetWaitingState() { 1951 void RenderFrameHostImpl::ResetWaitingState() {
1951 DCHECK(is_active()); 1952 DCHECK(is_active());
1952 1953
(...skipping 810 matching lines...) Expand 10 before | Expand all | Expand 10 after
2763 // handler after it's destroyed so it can't run after the RFHI is destroyed. 2764 // handler after it's destroyed so it can't run after the RFHI is destroyed.
2764 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( 2765 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind(
2765 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); 2766 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this)));
2766 } 2767 }
2767 2768
2768 void RenderFrameHostImpl::DeleteWebBluetoothService() { 2769 void RenderFrameHostImpl::DeleteWebBluetoothService() {
2769 web_bluetooth_service_.reset(); 2770 web_bluetooth_service_.reset();
2770 } 2771 }
2771 2772
2772 } // namespace content 2773 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/DEPS ('k') | content/browser/vr/android/cardboard/cardboard_vr_device.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698