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

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

Issue 2167643003: Refactored VRService interaction and added VRServiceClient (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Liberal sprinkling of 'u's Created 4 years, 4 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 | « no previous file | device/BUILD.gn » ('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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 #endif 100 #endif
101 #endif 101 #endif
102 102
103 #if defined(OS_MACOSX) 103 #if defined(OS_MACOSX)
104 #include "content/browser/frame_host/popup_menu_helper_mac.h" 104 #include "content/browser/frame_host/popup_menu_helper_mac.h"
105 #endif 105 #endif
106 106
107 #if defined(ENABLE_WEBVR) 107 #if defined(ENABLE_WEBVR)
108 #include "base/command_line.h" 108 #include "base/command_line.h"
109 #include "content/public/common/content_switches.h" 109 #include "content/public/common/content_switches.h"
110 #include "device/vr/vr_device_manager.h" // nogncheck 110 #include "device/vr/vr_service_impl.h" // nogncheck
111 #endif 111 #endif
112 112
113 using base::TimeDelta; 113 using base::TimeDelta;
114 114
115 namespace content { 115 namespace content {
116 116
117 namespace { 117 namespace {
118 118
119 // The next value to use for the accessibility reset token. 119 // The next value to use for the accessibility reset token.
120 int g_next_accessibility_reset_token = 1; 120 int g_next_accessibility_reset_token = 1;
(...skipping 1994 matching lines...) Expand 10 before | Expand all | Expand 10 after
2115 base::Bind(&CreateMediaServiceFactory, 2115 base::Bind(&CreateMediaServiceFactory,
2116 GetProcess()->GetBrowserContext(), this)); 2116 GetProcess()->GetBrowserContext(), this));
2117 #endif // defined(MOJO_SHELL_CLIENT) 2117 #endif // defined(MOJO_SHELL_CLIENT)
2118 2118
2119 #if defined(ENABLE_WEBVR) 2119 #if defined(ENABLE_WEBVR)
2120 const base::CommandLine& browser_command_line = 2120 const base::CommandLine& browser_command_line =
2121 *base::CommandLine::ForCurrentProcess(); 2121 *base::CommandLine::ForCurrentProcess();
2122 2122
2123 if (browser_command_line.HasSwitch(switches::kEnableWebVR)) { 2123 if (browser_command_line.HasSwitch(switches::kEnableWebVR)) {
2124 GetInterfaceRegistry()->AddInterface<device::VRService>( 2124 GetInterfaceRegistry()->AddInterface<device::VRService>(
2125 base::Bind(&device::VRDeviceManager::BindRequest)); 2125 base::Bind(&device::VRServiceImpl::BindRequest));
2126 } 2126 }
2127 #endif 2127 #endif
2128 2128
2129 GetContentClient()->browser()->RegisterRenderFrameMojoInterfaces( 2129 GetContentClient()->browser()->RegisterRenderFrameMojoInterfaces(
2130 GetInterfaceRegistry(), this); 2130 GetInterfaceRegistry(), this);
2131 } 2131 }
2132 2132
2133 void RenderFrameHostImpl::ResetWaitingState() { 2133 void RenderFrameHostImpl::ResetWaitingState() {
2134 DCHECK(is_active()); 2134 DCHECK(is_active());
2135 2135
(...skipping 887 matching lines...) Expand 10 before | Expand all | Expand 10 after
3023 // handler after it's destroyed so it can't run after the RFHI is destroyed. 3023 // handler after it's destroyed so it can't run after the RFHI is destroyed.
3024 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( 3024 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind(
3025 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); 3025 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this)));
3026 } 3026 }
3027 3027
3028 void RenderFrameHostImpl::DeleteWebBluetoothService() { 3028 void RenderFrameHostImpl::DeleteWebBluetoothService() {
3029 web_bluetooth_service_.reset(); 3029 web_bluetooth_service_.reset();
3030 } 3030 }
3031 3031
3032 } // namespace content 3032 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | device/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698