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

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

Issue 2385123005: Enable WebVR origin trial experiments. (Closed)
Patch Set: rebase against ToT Created 4 years, 2 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
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 2183 matching lines...) Expand 10 before | Expand all | Expand 10 after
2194 2194
2195 // This is to support usage of WebSockets in cases in which there is an 2195 // This is to support usage of WebSockets in cases in which there is an
2196 // associated RenderFrame. This is important for showing the correct security 2196 // associated RenderFrame. This is important for showing the correct security
2197 // state of the page and also honoring user override of bad certificates. 2197 // state of the page and also honoring user override of bad certificates.
2198 GetInterfaceRegistry()->AddInterface( 2198 GetInterfaceRegistry()->AddInterface(
2199 base::Bind(&WebSocketManager::CreateWebSocket, 2199 base::Bind(&WebSocketManager::CreateWebSocket,
2200 process_->GetID(), 2200 process_->GetID(),
2201 routing_id_)); 2201 routing_id_));
2202 2202
2203 #if defined(ENABLE_WEBVR) 2203 #if defined(ENABLE_WEBVR)
2204 const base::CommandLine& browser_command_line = 2204 GetInterfaceRegistry()->AddInterface<device::VRService>(
2205 *base::CommandLine::ForCurrentProcess(); 2205 base::Bind(&device::VRServiceImpl::BindRequest));
2206
2207 if (browser_command_line.HasSwitch(switches::kEnableWebVR)) {
clamy 2016/10/07 11:09:54 Why not use directly "if (base::CommandLine::ForCu
iclelland 2016/10/07 14:51:50 Isn't that line being deleted, though?
clamy 2016/10/07 14:54:40 I'm not quite sure what you mean? If you like at h
iclelland 2016/10/07 15:11:16 I mean that this CL *deletes* the line you're talk
clamy 2016/10/07 15:13:59 Sorry my bad, I read too quickly :-/.
2208 GetInterfaceRegistry()->AddInterface<device::VRService>(
2209 base::Bind(&device::VRServiceImpl::BindRequest));
2210 }
2211 #endif 2206 #endif
2212 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 2207 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
2213 switches::kEnableGenericSensors)) { 2208 switches::kEnableGenericSensors)) {
2214 GetInterfaceRegistry()->AddInterface( 2209 GetInterfaceRegistry()->AddInterface(
2215 base::Bind(&device::SensorProviderImpl::Create), 2210 base::Bind(&device::SensorProviderImpl::Create),
2216 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); 2211 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO));
2217 } 2212 }
2218 2213
2219 GetContentClient()->browser()->RegisterRenderFrameMojoInterfaces( 2214 GetContentClient()->browser()->RegisterRenderFrameMojoInterfaces(
2220 GetInterfaceRegistry(), this); 2215 GetInterfaceRegistry(), this);
(...skipping 893 matching lines...) Expand 10 before | Expand all | Expand 10 after
3114 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( 3109 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind(
3115 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); 3110 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this)));
3116 return web_bluetooth_service_.get(); 3111 return web_bluetooth_service_.get();
3117 } 3112 }
3118 3113
3119 void RenderFrameHostImpl::DeleteWebBluetoothService() { 3114 void RenderFrameHostImpl::DeleteWebBluetoothService() {
3120 web_bluetooth_service_.reset(); 3115 web_bluetooth_service_.reset();
3121 } 3116 }
3122 3117
3123 } // namespace content 3118 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698