1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CONTENT_RENDERER_BATTERY_STATUS_BATTERY_STATUS_DISPATCHER_H_
6 #define CONTENT_RENDERER_BATTERY_STATUS_BATTERY_STATUS_DISPATCHER_H_
8 #include "base/compiler_specific.h"
9 #include "base/macros.h"
10 #include "content/common/content_export.h"
11 #include "device/battery/battery_monitor.mojom.h"
14 class WebBatteryStatusListener
;
19 class CONTENT_EXPORT BatteryStatusDispatcher
{
21 explicit BatteryStatusDispatcher(blink::WebBatteryStatusListener
* listener
);
22 ~BatteryStatusDispatcher();
25 friend class BatteryStatusDispatcherTest
;
27 void QueryNextStatus();
28 void DidChange(device::BatteryStatusPtr battery_status
);
30 device::BatteryMonitorPtr monitor_
;
31 blink::WebBatteryStatusListener
* listener_
;
33 DISALLOW_COPY_AND_ASSIGN(BatteryStatusDispatcher
);
36 } // namespace content
38 #endif // CONTENT_RENDERER_BATTERY_STATUS_BATTERY_STATUS_DISPATCHER_H_