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

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

Issue 258173004: [NO SUBMIT] Battery Status API skeleton implementation ASYNC Base URL: https://chromium.googlesource.com/chromium/src.git@April-17-battery-status-renderer-and-IPC
Patch Set: Created 6 years, 7 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
OLDNEW
(Empty)
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.
4
5 #ifndef CONTENT_RENDERER_BATTERY_STATUS_BATTERY_STATUS_DISPATCHER_H_
6 #define CONTENT_RENDERER_BATTERY_STATUS_BATTERY_STATUS_DISPATCHER_H_
7
8 #include "content/public/renderer/render_process_observer.h"
9
10 namespace blink {
11 class WebBatteryListener;
12 class WebBatteryStatus;
13 }
14
15 namespace content {
16 class RenderThread;
17
18 class CONTENT_EXPORT BatteryStatusDispatcher : public RenderProcessObserver {
19 public:
20 BatteryStatusDispatcher();
21 virtual ~BatteryStatusDispatcher();
22
23 void Attach(RenderThread* thread);
24 virtual bool OnControlMessageReceived(const IPC::Message& message) OVERRIDE;
25
26 // Sets the listener to receive battery status updates. Returns true if the
27 // registration was successful.
28 bool SetListener(blink::WebBatteryListener* listener);
29
30 private:
31 virtual bool Start();
32 virtual bool Stop();
33 void OnDidChange(const blink::WebBatteryStatus& status);
34
35 blink::WebBatteryListener* listener_;
36 };
37
38 } // namespace content
39
40 #endif // CONTENT_RENDERER_BATTERY_STATUS_BATTERY_STATUS_DISPATCHER_H_
OLDNEW
« no previous file with comments | « content/renderer/battery_status/OWNERS ('k') | content/renderer/battery_status/battery_status_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698