Chromium Code Reviews| 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 2166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2177 // state of the page and also honoring user override of bad certificates. | 2177 // state of the page and also honoring user override of bad certificates. |
| 2178 GetInterfaceRegistry()->AddInterface( | 2178 GetInterfaceRegistry()->AddInterface( |
| 2179 base::Bind(&WebSocketManager::CreateWebSocket, | 2179 base::Bind(&WebSocketManager::CreateWebSocket, |
| 2180 process_->GetID(), | 2180 process_->GetID(), |
| 2181 routing_id_)); | 2181 routing_id_)); |
| 2182 | 2182 |
| 2183 #if defined(ENABLE_WEBVR) | 2183 #if defined(ENABLE_WEBVR) |
| 2184 const base::CommandLine& browser_command_line = | 2184 const base::CommandLine& browser_command_line = |
| 2185 *base::CommandLine::ForCurrentProcess(); | 2185 *base::CommandLine::ForCurrentProcess(); |
| 2186 | 2186 |
| 2187 // What to do here? This is behind a build flag any way so maybe wait until | |
|
iclelland
2016/10/05 21:55:57
If WebVR ships as an origin trial, then I think th
amp
2016/10/05 22:04:43
I think we are going for having the components alw
| |
| 2188 // that is fixed to modify this, but then should this be gated by runtime and | |
| 2189 // origin trial features, not a command line switch directly? | |
| 2190 // WebBluetooth (which is also in an origin trial) also uses a command line | |
| 2191 // switch in this file. | |
| 2187 if (browser_command_line.HasSwitch(switches::kEnableWebVR)) { | 2192 if (browser_command_line.HasSwitch(switches::kEnableWebVR)) { |
| 2193 /* | |
| 2194 if (RuntimeEnabledFeatures::webVREnabled()) | |
| 2195 // || OriginTrials::webVREnabled()) | |
| 2196 */ | |
| 2188 GetInterfaceRegistry()->AddInterface<device::VRService>( | 2197 GetInterfaceRegistry()->AddInterface<device::VRService>( |
| 2189 base::Bind(&device::VRServiceImpl::BindRequest)); | 2198 base::Bind(&device::VRServiceImpl::BindRequest)); |
| 2190 } | 2199 } |
| 2191 #endif | 2200 #endif |
| 2192 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 2201 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 2193 switches::kEnableGenericSensors)) { | 2202 switches::kEnableGenericSensors)) { |
| 2194 GetInterfaceRegistry()->AddInterface( | 2203 GetInterfaceRegistry()->AddInterface( |
| 2195 base::Bind(&device::SensorProviderImpl::Create), | 2204 base::Bind(&device::SensorProviderImpl::Create), |
| 2196 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); | 2205 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); |
| 2197 } | 2206 } |
| (...skipping 890 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3088 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( | 3097 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( |
| 3089 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); | 3098 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); |
| 3090 return web_bluetooth_service_.get(); | 3099 return web_bluetooth_service_.get(); |
| 3091 } | 3100 } |
| 3092 | 3101 |
| 3093 void RenderFrameHostImpl::DeleteWebBluetoothService() { | 3102 void RenderFrameHostImpl::DeleteWebBluetoothService() { |
| 3094 web_bluetooth_service_.reset(); | 3103 web_bluetooth_service_.reset(); |
| 3095 } | 3104 } |
| 3096 | 3105 |
| 3097 } // namespace content | 3106 } // namespace content |
| OLD | NEW |