Index: device/power_monitor/public/cpp/power_monitor_broadcast_source.h |
diff --git a/content/child/power_monitor_broadcast_source.h b/device/power_monitor/public/cpp/power_monitor_broadcast_source.h |
similarity index 57% |
rename from content/child/power_monitor_broadcast_source.h |
rename to device/power_monitor/public/cpp/power_monitor_broadcast_source.h |
index c5358eaed29978b583a3e7c82bb54348dab2d006..d5774b5a91ef1c3a7ee56f77e37eb8eb89c7e0f4 100644 |
--- a/content/child/power_monitor_broadcast_source.h |
+++ b/device/power_monitor/public/cpp/power_monitor_broadcast_source.h |
@@ -2,24 +2,26 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#ifndef CONTENT_CHILD_POWER_MONITOR_BROADCAST_SOURCE_H_ |
-#define CONTENT_CHILD_POWER_MONITOR_BROADCAST_SOURCE_H_ |
+#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 "content/common/content_export.h" |
+#include "device/power_monitor/power_monitor_export.h" |
#include "device/power_monitor/public/interfaces/power_monitor.mojom.h" |
#include "mojo/public/cpp/bindings/binding.h" |
-namespace content { |
+namespace device { |
-// Receives Power Monitor IPC messages sent from the browser process and relays |
-// them to the PowerMonitor of the current process. |
-class CONTENT_EXPORT PowerMonitorBroadcastSource |
+// Set itself as a client of Power Monitor in browser process, Receives state- |
blundell
2016/11/07 12:50:08
nit: Eliminate everything before "Receives". (in d
ke.he
2016/11/08 08:59:56
Done.
|
+// changes from Power Monitor through mojo, and relays them to the PowerMonitor |
+// of the current process. |
+class DEVICE_POWER_MONITOR_EXPORT PowerMonitorBroadcastSource |
: public base::PowerMonitorSource, |
NON_EXPORTED_BASE(public device::mojom::PowerMonitorClient) { |
public: |
- explicit PowerMonitorBroadcastSource(); |
+ explicit PowerMonitorBroadcastSource( |
+ device::mojom::PowerMonitor* power_monitor); |
blundell
2016/11/07 12:50:08
I was suggesting to initialize this with an Interf
ke.he
2016/11/08 08:59:56
I guess you mean InterfaceProvider here.
Done.
|
~PowerMonitorBroadcastSource() override; |
void PowerStateChange(bool on_battery_power) override; |
@@ -34,6 +36,6 @@ class CONTENT_EXPORT PowerMonitorBroadcastSource |
DISALLOW_COPY_AND_ASSIGN(PowerMonitorBroadcastSource); |
}; |
-} // namespace content |
+} // namespace device |
-#endif // CONTENT_CHILD_POWER_MONITOR_BROADCAST_SOURCE_H_ |
+#endif // DEVICE_POWER_MONITOR_POWER_MONITOR_BROADCAST_SOURCE_H_ |