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 "content/public/renderer/platform_event_observer.h"
11 class WebBatteryStatus
;
12 class WebBatteryStatusListener
;
18 class CONTENT_EXPORT BatteryStatusDispatcher
20 public PlatformEventObserver
<blink::WebBatteryStatusListener
>) {
22 explicit BatteryStatusDispatcher(RenderThread
* thread
);
23 virtual ~BatteryStatusDispatcher();
25 // PlatformEventObserver public methods.
26 virtual bool OnControlMessageReceived(const IPC::Message
& message
) OVERRIDE
;
27 virtual void SendFakeDataForTesting(void* data
) OVERRIDE
;
30 // PlatformEventObserver protected methods.
31 virtual void SendStartMessage() OVERRIDE
;
32 virtual void SendStopMessage() OVERRIDE
;
35 void OnDidChange(const blink::WebBatteryStatus
& status
);
37 DISALLOW_COPY_AND_ASSIGN(BatteryStatusDispatcher
);
40 } // namespace content
42 #endif // CONTENT_RENDERER_BATTERY_STATUS_BATTERY_STATUS_DISPATCHER_H_