| Index: content/renderer/battery_status_dispatcher.h
|
| diff --git a/content/renderer/battery_status_dispatcher.h b/content/renderer/battery_status_dispatcher.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..066d25c184fa1d13a80db2dea08ce896e17a7d4b
|
| --- /dev/null
|
| +++ b/content/renderer/battery_status_dispatcher.h
|
| @@ -0,0 +1,38 @@
|
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef CONTENT_RENDERER_BATTERY_STATUS_DISPATCHER_H_
|
| +#define CONTENT_RENDERER_BATTERY_STATUS_DISPATCHER_H_
|
| +
|
| +#include "content/public/renderer/render_view_observer.h"
|
| +#include "third_party/WebKit/Source/WebKit/chromium/public/WebBatteryStatusClient.h"
|
| +
|
| +namespace WebKit {
|
| +class WebBatteryStatus;
|
| +}
|
| +
|
| +class RenderViewImpl;
|
| +
|
| +class BatteryStatusDispatcher : public content::RenderViewObserver,
|
| + public WebKit::WebBatteryStatusClient {
|
| + public:
|
| + explicit BatteryStatusDispatcher(RenderViewImpl* render_view);
|
| + virtual ~BatteryStatusDispatcher();
|
| +
|
| + private:
|
| + void OnBatteryStatusUpdated(const IPC::Message& message);
|
| +
|
| + // RenderView::Observer implementation.
|
| + virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
|
| +
|
| + // WebKit::WebBatteryStatusClient implementation.
|
| + virtual void startUpdating();
|
| + virtual void stopUpdating();
|
| +
|
| + bool started_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(BatteryStatusDispatcher);
|
| +};
|
| +
|
| +#endif // CONTENT_RENDERER_BATTERY_STATUS_DISPATCHER_H_
|
|
|