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

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: file-move 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 class BatteryStatusDispatcher : public content::RenderViewObserver,
18 public WebKit::WebBatteryStatusClient {
19 public:
20 explicit BatteryStatusDispatcher(RenderViewImpl* render_view);
21 virtual ~BatteryStatusDispatcher();
22
23 private:
24 void OnBatteryStatusUpdated(const IPC::Message& message);
25
26 // RenderView::Observer implementation.
27 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
28
29 // WebKit::WebBatteryStatusClient implementation.
30 virtual void startUpdating();
31 virtual void stopUpdating();
32
33 bool started_;
34
35 DISALLOW_COPY_AND_ASSIGN(BatteryStatusDispatcher);
36 };
37
38 #endif // CONTENT_RENDERER_BATTERY_STATUS_DISPATCHER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698