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

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

Issue 2029703002: Moving VR service from /content/browser to /device (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added nogncheck to failing include Created 4 years, 6 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/android/browser_jni_registrar.cc ('k') | content/browser/vr/OWNERS » ('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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 #if defined(OS_ANDROID) 88 #if defined(OS_ANDROID)
89 #include "content/browser/mojo/service_registrar_android.h" 89 #include "content/browser/mojo/service_registrar_android.h"
90 #endif 90 #endif
91 91
92 #if defined(OS_MACOSX) 92 #if defined(OS_MACOSX)
93 #include "content/browser/frame_host/popup_menu_helper_mac.h" 93 #include "content/browser/frame_host/popup_menu_helper_mac.h"
94 #endif 94 #endif
95 95
96 #if defined(ENABLE_WEBVR) 96 #if defined(ENABLE_WEBVR)
97 #include "base/command_line.h" 97 #include "base/command_line.h"
98 #include "content/browser/vr/vr_device_manager.h"
99 #include "content/public/common/content_switches.h" 98 #include "content/public/common/content_switches.h"
99 #include "device/vr/vr_device_manager.h" // nogncheck
100 #endif 100 #endif
101 101
102 using base::TimeDelta; 102 using base::TimeDelta;
103 103
104 namespace content { 104 namespace content {
105 105
106 namespace { 106 namespace {
107 107
108 // The next value to use for the accessibility reset token. 108 // The next value to use for the accessibility reset token.
109 int g_next_accessibility_reset_token = 1; 109 int g_next_accessibility_reset_token = 1;
(...skipping 1909 matching lines...) Expand 10 before | Expand all | Expand 10 after
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<blink::mojom::VRService>(
2029 base::Bind(&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());
2039 2039
(...skipping 816 matching lines...) Expand 10 before | Expand all | Expand 10 after
2856 // handler after it's destroyed so it can't run after the RFHI is destroyed. 2856 // handler after it's destroyed so it can't run after the RFHI is destroyed.
2857 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( 2857 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind(
2858 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); 2858 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this)));
2859 } 2859 }
2860 2860
2861 void RenderFrameHostImpl::DeleteWebBluetoothService() { 2861 void RenderFrameHostImpl::DeleteWebBluetoothService() {
2862 web_bluetooth_service_.reset(); 2862 web_bluetooth_service_.reset();
2863 } 2863 }
2864 2864
2865 } // namespace content 2865 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/android/browser_jni_registrar.cc ('k') | content/browser/vr/OWNERS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698