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

Unified Diff: device/power_monitor/public/cpp/power_monitor_broadcast_source.h

Issue 2678373003: [DeviceService] Move PowerMonitor interfaces, client lib, impl to live in Device Service (Closed)
Patch Set: Created 3 years, 10 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
Index: device/power_monitor/public/cpp/power_monitor_broadcast_source.h
diff --git a/device/power_monitor/public/cpp/power_monitor_broadcast_source.h b/device/power_monitor/public/cpp/power_monitor_broadcast_source.h
deleted file mode 100644
index 2a4c94a0957bc3de742003b8a0e92a3e878ef3e4..0000000000000000000000000000000000000000
--- a/device/power_monitor/public/cpp/power_monitor_broadcast_source.h
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright (c) 2013 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_POWER_MONITOR_POWER_MONITOR_BROADCAST_SOURCE_H_
-#define DEVICE_POWER_MONITOR_POWER_MONITOR_BROADCAST_SOURCE_H_
-
-#include "base/macros.h"
-#include "base/power_monitor/power_monitor_source.h"
-#include "device/power_monitor/public/interfaces/power_monitor.mojom.h"
-#include "mojo/public/cpp/bindings/binding.h"
-#include "services/service_manager/public/cpp/interface_provider.h"
-
-namespace device {
-
-// Receives state changes from Power Monitor through mojo, and relays them to
-// the PowerMonitor of the current process.
-class PowerMonitorBroadcastSource : public base::PowerMonitorSource,
- public device::mojom::PowerMonitorClient {
- public:
- explicit PowerMonitorBroadcastSource(
- service_manager::InterfaceProvider* interface_provider);
- ~PowerMonitorBroadcastSource() override;
-
- void PowerStateChange(bool on_battery_power) override;
- void Suspend() override;
- void Resume() override;
-
- private:
- bool IsOnBatteryPowerImpl() override;
- bool last_reported_battery_power_state_;
- mojo::Binding<device::mojom::PowerMonitorClient> binding_;
-
- DISALLOW_COPY_AND_ASSIGN(PowerMonitorBroadcastSource);
-};
-
-} // namespace device
-
-#endif // DEVICE_POWER_MONITOR_POWER_MONITOR_BROADCAST_SOURCE_H_
« no previous file with comments | « device/power_monitor/public/cpp/BUILD.gn ('k') | device/power_monitor/public/cpp/power_monitor_broadcast_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698