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

Side by Side Diff: device/generic_sensor/platform_sensor_provider_mac.cc

Issue 2859553003: Update PlatformSensorAmbientLightMac constructor (Closed)
Patch Set: update PlatformSensorAmbientLightMac constructor Created 3 years, 7 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 | « device/generic_sensor/platform_sensor_ambient_light_mac.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "device/generic_sensor/platform_sensor_provider_mac.h" 5 #include "device/generic_sensor/platform_sensor_provider_mac.h"
6 6
7 #include "base/memory/singleton.h" 7 #include "base/memory/singleton.h"
8 #include "device/generic_sensor/platform_sensor_ambient_light_mac.h" 8 #include "device/generic_sensor/platform_sensor_ambient_light_mac.h"
9 9
10 namespace device { 10 namespace device {
(...skipping 10 matching lines...) Expand all
21 PlatformSensorProviderMac::~PlatformSensorProviderMac() = default; 21 PlatformSensorProviderMac::~PlatformSensorProviderMac() = default;
22 22
23 void PlatformSensorProviderMac::CreateSensorInternal( 23 void PlatformSensorProviderMac::CreateSensorInternal(
24 mojom::SensorType type, 24 mojom::SensorType type,
25 mojo::ScopedSharedBufferMapping mapping, 25 mojo::ScopedSharedBufferMapping mapping,
26 const CreateSensorCallback& callback) { 26 const CreateSensorCallback& callback) {
27 // Create Sensors here. 27 // Create Sensors here.
28 switch (type) { 28 switch (type) {
29 case mojom::SensorType::AMBIENT_LIGHT: { 29 case mojom::SensorType::AMBIENT_LIGHT: {
30 scoped_refptr<PlatformSensor> sensor = 30 scoped_refptr<PlatformSensor> sensor =
31 new PlatformSensorAmbientLightMac(type, std::move(mapping), this); 31 new PlatformSensorAmbientLightMac(std::move(mapping), this);
32 callback.Run(std::move(sensor)); 32 callback.Run(std::move(sensor));
33 break; 33 break;
34 } 34 }
35 default: 35 default:
36 NOTIMPLEMENTED(); 36 NOTIMPLEMENTED();
37 callback.Run(nullptr); 37 callback.Run(nullptr);
38 } 38 }
39 } 39 }
40 40
41 } // namespace device 41 } // namespace device
OLDNEW
« no previous file with comments | « device/generic_sensor/platform_sensor_ambient_light_mac.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698