| Index: third_party/WebKit/Source/modules/battery/BatteryDispatcher.h
|
| diff --git a/third_party/WebKit/Source/modules/battery/BatteryDispatcher.h b/third_party/WebKit/Source/modules/battery/BatteryDispatcher.h
|
| index cd99dec25f8a7572ce8d71cca15625687b18ed99..40c3fcfb2ebf307d45372439b08f9c12e018c191 100644
|
| --- a/third_party/WebKit/Source/modules/battery/BatteryDispatcher.h
|
| +++ b/third_party/WebKit/Source/modules/battery/BatteryDispatcher.h
|
| @@ -6,26 +6,26 @@
|
| #define BatteryDispatcher_h
|
|
|
| #include "core/frame/PlatformEventDispatcher.h"
|
| -#include "modules/ModulesExport.h"
|
| #include "modules/battery/BatteryManager.h"
|
| -#include "platform/battery/battery_dispatcher_proxy.h"
|
| -#include "wtf/OwnPtr.h"
|
| +#include "modules/battery/BatteryStatus.h"
|
| +#include "public/platform/WebBatteryStatusListener.h"
|
|
|
| namespace blink {
|
|
|
| -class MODULES_EXPORT BatteryDispatcher final : public GarbageCollectedFinalized<BatteryDispatcher>, public PlatformEventDispatcher, public BatteryDispatcherProxy::Listener {
|
| +class WebBatteryStatus;
|
| +
|
| +class BatteryDispatcher final : public GarbageCollectedFinalized<BatteryDispatcher>, public PlatformEventDispatcher, public WebBatteryStatusListener {
|
| USING_GARBAGE_COLLECTED_MIXIN(BatteryDispatcher);
|
| public:
|
| static BatteryDispatcher& instance();
|
| ~BatteryDispatcher() override;
|
|
|
| - const BatteryStatus* latestData() const
|
| - {
|
| - return m_hasLatestData ? &m_batteryStatus : nullptr;
|
| - }
|
| + BatteryStatus* latestData();
|
|
|
| - // Inherited from BatteryDispatcherProxy::Listener.
|
| - void OnUpdateBatteryStatus(const BatteryStatus&) override;
|
| + // Inherited from WebBatteryStatusListener.
|
| + void updateBatteryStatus(const WebBatteryStatus&) override;
|
| +
|
| + DECLARE_VIRTUAL_TRACE();
|
|
|
| private:
|
| BatteryDispatcher();
|
| @@ -34,9 +34,7 @@
|
| void startListening() override;
|
| void stopListening() override;
|
|
|
| - BatteryStatus m_batteryStatus;
|
| - bool m_hasLatestData;
|
| - OwnPtr<BatteryDispatcherProxy> m_batteryDispatcherProxy;
|
| + Member<BatteryStatus> m_batteryStatus;
|
| };
|
|
|
| } // namespace blink
|
|
|