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

Side by Side Diff: device/battery/battery_status_manager.h

Issue 457933002: Replace Chrome IPC with Mojo IPC for querying BatteryStatus service Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 3 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
« no previous file with comments | « device/battery/battery_status.mojom ('k') | device/battery/battery_status_manager_android.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_BATTERY_STATUS_BATTERY_STATUS_MANAGER_H_ 5 #ifndef DEVICE_BATTERY_BATTERY_STATUS_MANAGER_H_
6 #define CHROME_BROWSER_BATTERY_STATUS_BATTERY_STATUS_MANAGER_H_ 6 #define DEVICE_BATTERY_BATTERY_STATUS_MANAGER_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "content/browser/battery_status/battery_status_service.h" 10 #include "device/battery/battery_status_service.h"
11 11
12 namespace content { 12 namespace device {
13 13
14 // Platform specific manager class for fetching battery status data. 14 // Platform specific manager class for fetching battery status data.
15 class CONTENT_EXPORT BatteryStatusManager { 15 class BatteryStatusManager {
16 public: 16 public:
17 // Creates a BatteryStatusManager object. |callback| should be called when the 17 // Creates a BatteryStatusManager object. |callback| should be called when the
18 // battery status changes. 18 // battery status changes.
19 static scoped_ptr<BatteryStatusManager> Create( 19 static scoped_ptr<BatteryStatusManager> Create(
20 const BatteryStatusService::BatteryUpdateCallback& callback); 20 const BatteryStatusService::BatteryUpdateCallback& callback);
21 21
22 virtual ~BatteryStatusManager() {} 22 virtual ~BatteryStatusManager() {}
23 23
24 // Start listening for battery status changes. New updates are signalled 24 // Start listening for battery status changes. New updates are signalled
25 // by invoking the callback provided at construction time. 25 // by invoking the callback provided at construction time.
26 // Note that this is called in the IO thread. 26 // Note that this is called in the IO thread.
27 virtual bool StartListeningBatteryChange() = 0; 27 virtual bool StartListeningBatteryChange() = 0;
28 28
29 // Stop listening for battery status changes. 29 // Stop listening for battery status changes.
30 // Note that this is called in the IO thread. 30 // Note that this is called in the IO thread.
31 virtual void StopListeningBatteryChange() = 0; 31 virtual void StopListeningBatteryChange() = 0;
32 }; 32 };
33 33
34 } // namespace content 34 } // namespace device
35 35
36 #endif // CHROME_BROWSER_BATTERY_STATUS_BATTERY_STATUS_MANAGER_H_ 36 #endif // DEVICE_BATTERY_BATTERY_STATUS_MANAGER_H_
OLDNEW
« no previous file with comments | « device/battery/battery_status.mojom ('k') | device/battery/battery_status_manager_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698