Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(908)

Side by Side Diff: content/renderer/battery_status_dispatcher.h

Issue 10024013: chromeos: Add support for the battery status API on chromeos. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012 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.
4
5 #ifndef CONTENT_RENDERER_BATTERY_STATUS_DISPATCHER_H_
6 #define CONTENT_RENDERER_BATTERY_STATUS_DISPATCHER_H_
7
8 #include "content/public/renderer/render_view_observer.h"
9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebBatteryStatusClien t.h"
10
11 namespace WebKit {
12 class WebBatteryStatus;
13 }
14
15 class RenderViewImpl;
16
17 namespace content {
18
19 class BatteryStatusDispatcher : public RenderViewObserver,
20 public WebKit::WebBatteryStatusClient {
21 public:
22 explicit BatteryStatusDispatcher(RenderViewImpl* render_view);
23 virtual ~BatteryStatusDispatcher();
24
25 private:
26 void OnBatteryStatusUpdated(const WebKit::WebBatteryStatus& battery_status);
27
28 // RenderView::Observer implementation.
29 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
30
31 // WebKit::WebBatteryStatusClient implementation.
32 virtual void startUpdating();
33 virtual void stopUpdating();
34
35 bool started_;
36
37 DISALLOW_COPY_AND_ASSIGN(BatteryStatusDispatcher);
38 };
39
40 } // namespace content
41
42 #endif // CONTENT_RENDERER_BATTERY_STATUS_DISPATCHER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698