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

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

Issue 2480773002: Reland of [sensors] Ambient light sensor implementation for ChromeOS and Linux. (Closed)
Patch Set: remove parenthesis 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
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | 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 2204 matching lines...) Expand 10 before | Expand all | Expand 10 after
2215 base::Bind(&WebSocketManager::CreateWebSocket, 2215 base::Bind(&WebSocketManager::CreateWebSocket,
2216 process_->GetID(), 2216 process_->GetID(),
2217 routing_id_)); 2217 routing_id_));
2218 2218
2219 #if defined(ENABLE_WEBVR) 2219 #if defined(ENABLE_WEBVR)
2220 GetInterfaceRegistry()->AddInterface<device::VRService>( 2220 GetInterfaceRegistry()->AddInterface<device::VRService>(
2221 base::Bind(&device::VRServiceImpl::BindRequest)); 2221 base::Bind(&device::VRServiceImpl::BindRequest));
2222 #endif 2222 #endif
2223 if (base::FeatureList::IsEnabled(features::kGenericSensor)) { 2223 if (base::FeatureList::IsEnabled(features::kGenericSensor)) {
2224 GetInterfaceRegistry()->AddInterface( 2224 GetInterfaceRegistry()->AddInterface(
2225 base::Bind(&device::SensorProviderImpl::Create), 2225 base::Bind(&device::SensorProviderImpl::Create,
2226 BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE)),
2226 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); 2227 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO));
2227 } 2228 }
2228 2229
2229 #if defined(ENABLE_WEBRTC) 2230 #if defined(ENABLE_WEBRTC)
2230 // BrowserMainLoop::GetInstance() may be null on unit tests. 2231 // BrowserMainLoop::GetInstance() may be null on unit tests.
2231 if (BrowserMainLoop::GetInstance()) { 2232 if (BrowserMainLoop::GetInstance()) {
2232 // BrowserMainLoop, which owns MediaStreamManager, is alive for the lifetime 2233 // BrowserMainLoop, which owns MediaStreamManager, is alive for the lifetime
2233 // of Mojo communication (see BrowserMainLoop::ShutdownThreadsAndCleanUp(), 2234 // of Mojo communication (see BrowserMainLoop::ShutdownThreadsAndCleanUp(),
2234 // which shuts down Mojo). Hence, passing that MediaStreamManager instance 2235 // which shuts down Mojo). Hence, passing that MediaStreamManager instance
2235 // as a raw pointer here is safe. 2236 // as a raw pointer here is safe.
(...skipping 943 matching lines...) Expand 10 before | Expand all | Expand 10 after
3179 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( 3180 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind(
3180 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); 3181 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this)));
3181 return web_bluetooth_service_.get(); 3182 return web_bluetooth_service_.get();
3182 } 3183 }
3183 3184
3184 void RenderFrameHostImpl::DeleteWebBluetoothService() { 3185 void RenderFrameHostImpl::DeleteWebBluetoothService() {
3185 web_bluetooth_service_.reset(); 3186 web_bluetooth_service_.reset();
3186 } 3187 }
3187 3188
3188 } // namespace content 3189 } // namespace content
OLDNEW
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | device/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698