Make USB permissions work in the new permission message system
[chromium-blink-merge.git] / content / renderer / battery_status / battery_status_dispatcher.h
blobf117a4b385e7ade0d39565f84bdb9bf6b9334a3c
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"
13 namespace blink {
14 class WebBatteryStatusListener;
17 namespace content {
19 class CONTENT_EXPORT BatteryStatusDispatcher {
20 public:
21 explicit BatteryStatusDispatcher(blink::WebBatteryStatusListener* listener);
22 ~BatteryStatusDispatcher();
24 private:
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_