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

Unified Diff: device/generic_sensor/platform_sensor_win.h

Issue 2865263002: Move //device/generic_sensor to be part of the internal implementation of the Device Service. (Closed)
Patch Set: code rebase 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « device/generic_sensor/platform_sensor_reader_win.cc ('k') | device/generic_sensor/platform_sensor_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/generic_sensor/platform_sensor_win.h
diff --git a/device/generic_sensor/platform_sensor_win.h b/device/generic_sensor/platform_sensor_win.h
deleted file mode 100644
index 043fb1c5d92d64faece01431a51113e0ddbedfe3..0000000000000000000000000000000000000000
--- a/device/generic_sensor/platform_sensor_win.h
+++ /dev/null
@@ -1,62 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef DEVICE_GENERIC_SENSOR_PLATFORM_SENSOR_WIN_H_
-#define DEVICE_GENERIC_SENSOR_PLATFORM_SENSOR_WIN_H_
-
-#include "base/memory/weak_ptr.h"
-#include "device/generic_sensor/platform_sensor.h"
-#include "device/generic_sensor/platform_sensor_reader_win.h"
-
-namespace base {
-class SingleThreadTaskRunner;
-}
-
-namespace device {
-
-// Implementation of PlatformSensor interface for Windows platform. Instance
-// of PlatformSensorWin is bound to IPC thread where PlatformSensorProvider is
-// running and communication with Windows platform sensor is done through
-// PlatformSensorReaderWin |sensor_reader_| interface which is bound to sensor
-// thread and communicates with PlatformSensorWin using
-// PlatformSensorReaderWin::Client interface. The error and data change events
-// are forwarded to IPC task runner.
-class PlatformSensorWin final : public PlatformSensor,
- public PlatformSensorReaderWin::Client {
- public:
- PlatformSensorWin(
- mojom::SensorType type,
- mojo::ScopedSharedBufferMapping mapping,
- PlatformSensorProvider* provider,
- scoped_refptr<base::SingleThreadTaskRunner> sensor_thread_runner,
- std::unique_ptr<PlatformSensorReaderWin> sensor_reader);
-
- PlatformSensorConfiguration GetDefaultConfiguration() override;
- mojom::ReportingMode GetReportingMode() override;
- double GetMaximumSupportedFrequency() override;
-
- // PlatformSensorReaderWin::Client interface implementation.
- void OnReadingUpdated(const SensorReading& reading) override;
- void OnSensorError() override;
-
- protected:
- ~PlatformSensorWin() override;
-
- // PlatformSensor interface implementation.
- bool StartSensor(const PlatformSensorConfiguration& configuration) override;
- void StopSensor() override;
- bool CheckSensorConfiguration(
- const PlatformSensorConfiguration& configuration) override;
-
- private:
- scoped_refptr<base::SingleThreadTaskRunner> sensor_thread_runner_;
- PlatformSensorReaderWin* const sensor_reader_;
- base::WeakPtrFactory<PlatformSensorWin> weak_factory_;
-
- DISALLOW_COPY_AND_ASSIGN(PlatformSensorWin);
-};
-
-} // namespace device
-
-#endif // DEVICE_GENERIC_SENSOR_PLATFORM_SENSOR_WIN_H_
« no previous file with comments | « device/generic_sensor/platform_sensor_reader_win.cc ('k') | device/generic_sensor/platform_sensor_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698