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

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

Issue 2370343002: [sensors] Ambient light sensor implementation for ChromeOS and Linux. (Closed)
Patch Set: change SetTaskRunner to SetFileTaskRunner as per offline discussion with Mikhail Created 4 years, 1 month 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 2188 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 GetInterfaceRegistry()->AddInterface<device::VRService>( 2204 GetInterfaceRegistry()->AddInterface<device::VRService>(
2205 base::Bind(&device::VRServiceImpl::BindRequest)); 2205 base::Bind(&device::VRServiceImpl::BindRequest));
2206 #endif 2206 #endif
2207 if (base::FeatureList::IsEnabled(features::kGenericSensor)) { 2207 if (base::FeatureList::IsEnabled(features::kGenericSensor)) {
2208 GetInterfaceRegistry()->AddInterface( 2208 GetInterfaceRegistry()->AddInterface(
2209 base::Bind(&device::SensorProviderImpl::Create), 2209 base::Bind(&device::SensorProviderImpl::Create,
2210 BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE)),
2210 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); 2211 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO));
2211 } 2212 }
2212 2213
2213 #if defined(ENABLE_WEBRTC) 2214 #if defined(ENABLE_WEBRTC)
2214 // BrowserMainLoop::GetInstance() may be null on unit tests. 2215 // BrowserMainLoop::GetInstance() may be null on unit tests.
2215 if (BrowserMainLoop::GetInstance()) { 2216 if (BrowserMainLoop::GetInstance()) {
2216 // BrowserMainLoop, which owns MediaStreamManager, is alive for the lifetime 2217 // BrowserMainLoop, which owns MediaStreamManager, is alive for the lifetime
2217 // of Mojo communication (see BrowserMainLoop::ShutdownThreadsAndCleanUp(), 2218 // of Mojo communication (see BrowserMainLoop::ShutdownThreadsAndCleanUp(),
2218 // which shuts down Mojo). Hence, passing that MediaStreamManager instance 2219 // which shuts down Mojo). Hence, passing that MediaStreamManager instance
2219 // as a raw pointer here is safe. 2220 // as a raw pointer here is safe.
(...skipping 929 matching lines...) Expand 10 before | Expand all | Expand 10 after
3149 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( 3150 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind(
3150 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); 3151 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this)));
3151 return web_bluetooth_service_.get(); 3152 return web_bluetooth_service_.get();
3152 } 3153 }
3153 3154
3154 void RenderFrameHostImpl::DeleteWebBluetoothService() { 3155 void RenderFrameHostImpl::DeleteWebBluetoothService() {
3155 web_bluetooth_service_.reset(); 3156 web_bluetooth_service_.reset();
3156 } 3157 }
3157 3158
3158 } // namespace content 3159 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698